@@ -79,18 +79,18 @@ func TestPrintOutput(t *testing.T) {
7979 "all" : {
8080 func () * perfops.RunOutput {
8181 var o * perfops.RunOutput
82- json .Unmarshal ([]byte (`{"id":"706fc55e3377104da01f05569e35a30b","items":[{"id":"bba072473bd034d432df03730e116686","result":{"output":"121","node":{"id":27,"as_number":12345,"latitude":22.28512548314,"longitude":114.17507171631,"country":{"id":195,"name":"Hong Kong","continent":{"id":2,"name":"Asia","iso":"AS"},"iso":"HK","iso_numeric":"344"},"city":"Hong Kong","sub_region":"Eastern Asia"},"time":1508061924.088372}}],"requested":"sendergram.com","finished":"true","elapsedTime":0.66500000000000004}` ), & o )
82+ json .Unmarshal ([]byte (`{"id":"706fc55e3377104da01f05569e35a30b","items":[{"id":"bba072473bd034d432df03730e116686","result":{"output":"121","finished": true," node":{"id":27,"as_number":12345,"latitude":22.28512548314,"longitude":114.17507171631,"country":{"id":195,"name":"Hong Kong","continent":{"id":2,"name":"Asia","iso":"AS"},"iso":"HK","iso_numeric":"344"},"city":"Hong Kong","sub_region":"Eastern Asia"},"time":1508061924.088372}}],"requested":"sendergram.com","finished":"true","elapsedTime":0.66500000000000004}` ), & o )
8383 return o
8484 },
85- "Node27 , AS12345, Hong Kong, Hong Kong\n 121\n " ,
85+ "\x1b [200DNode27 , AS12345, Hong Kong, Hong Kong\n 121\n " ,
8686 },
8787 "timeout" : {
8888 func () * perfops.RunOutput {
8989 var o * perfops.RunOutput
90- json .Unmarshal ([]byte (`{"id":"706fc55e3377104da01f05569e35a30b","items":[{"id":"bba072473bd034d432df03730e116686","result":{"output":"-2","node":{"id":27,"as_number":23456,"latitude":22.28512548314,"longitude":114.17507171631,"country":{"id":195,"name":"Hong Kong","continent":{"id":2,"name":"Asia","iso":"AS"},"iso":"HK","iso_numeric":"344"},"city":"Hong Kong","sub_region":"Eastern Asia"},"time":1508061924.088372}}],"requested":"sendergram.com","finished":"true","elapsedTime":0.66500000000000004}` ), & o )
90+ json .Unmarshal ([]byte (`{"id":"706fc55e3377104da01f05569e35a30b","items":[{"id":"bba072473bd034d432df03730e116686","result":{"output":"-2","finished": true," node":{"id":27,"as_number":23456,"latitude":22.28512548314,"longitude":114.17507171631,"country":{"id":195,"name":"Hong Kong","continent":{"id":2,"name":"Asia","iso":"AS"},"iso":"HK","iso_numeric":"344"},"city":"Hong Kong","sub_region":"Eastern Asia"},"time":1508061924.088372}}],"requested":"sendergram.com","finished":"true","elapsedTime":0.66500000000000004}` ), & o )
9191 return o
9292 },
93- "Node27 , AS23456, Hong Kong, Hong Kong\n The command timed-out. It either took too long to execute or we could not connect to your target at all.\n " ,
93+ "\x1b [200DNode27 , AS23456, Hong Kong, Hong Kong\n The command timed-out. It either took too long to execute or we could not connect to your target at all.\n " ,
9494 },
9595 }
9696
@@ -115,6 +115,7 @@ type testTerminalWriter struct {
115115func (w * testTerminalWriter ) Flush () error { return nil }
116116
117117func newTestFormatter (w io.Writer , printID bool ) * Formatter {
118+ termCols , termRows = 200 , 50
118119 f := & Formatter {
119120 printID : printID ,
120121 w : & testTerminalWriter {w },
0 commit comments