summaryrefslogtreecommitdiffstats
path: root/pkg/utils/utils_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/utils/utils_test.go')
-rw-r--r--pkg/utils/utils_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go
index 3a9f6817b..22a9c82dc 100644
--- a/pkg/utils/utils_test.go
+++ b/pkg/utils/utils_test.go
@@ -3,32 +3,32 @@ package utils
import "testing"
var testCases = []struct {
- Input []byte
+ Input []byte
Expected []byte
}{
{
// \r\n
- Input: []byte{97, 115, 100, 102, 13, 10},
- Expected: []byte{97, 115, 100, 102, 10},
+ Input: []byte{97, 115, 100, 102, 13, 10},
+ Expected: []byte{97, 115, 100, 102},
},
{
// \r
- Input: []byte{97, 115, 100, 102, 13},
- Expected: []byte{97, 115, 100, 102, 10},
+ Input: []byte{97, 115, 100, 102, 13},
+ Expected: []byte{97, 115, 100, 102},
},
{
// \n
- Input: []byte{97, 115, 100, 102, 10},
+ Input: []byte{97, 115, 100, 102, 10},
Expected: []byte{97, 115, 100, 102, 10},
},
-
}
func TestNormalizeLinefeeds(t *testing.T) {
-
for _, tc := range testCases {
- if NormalizeLinefeeds(string(tc.Input)) != string(tc.Expected) {
- t.Error("Error")
+ input := NormalizeLinefeeds(string(tc.Input))
+ expected := string(tc.Expected)
+ if input != expected {
+ t.Error("Expected " + expected + ", got " + input)
}
}
}