File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ func checkEncoding(t *testing.T, data []byte) {
1717 t .FailNow ()
1818 }
1919 // TODO move colorable wrapping outside the test
20- c := NewNonColorable (b )
21- c .Write (data )
20+ NewNonColorable (b ).Write (data )
2221 if b .Len () != len (data ) {
2322 t .Fatalf ("%d bytes expected, got %d" , len (data ), b .Len ())
2423 }
@@ -66,17 +65,15 @@ func TestNonColorableNil(t *testing.T) {
6665
6766func TestNonColorableESC (t * testing.T ) {
6867 var b bytes.Buffer
69- c := NewNonColorable (& b )
70- c .Write ([]byte {0x1b })
68+ NewNonColorable (& b ).Write ([]byte {0x1b })
7169 if b .Len () > 0 {
7270 t .Fatalf ("0 bytes expected, got %d" , b .Len ())
7371 }
7472}
7573
7674func TestNonColorableBadESC (t * testing.T ) {
7775 var b bytes.Buffer
78- c := NewNonColorable (& b )
79- c .Write ([]byte {0x1b , 0x1b })
76+ NewNonColorable (& b ).Write ([]byte {0x1b , 0x1b })
8077 if b .Len () > 0 {
8178 t .Fatalf ("0 bytes expected, got %d" , b .Len ())
8279 }
You can’t perform that action at this time.
0 commit comments