fix github-actions for windows

This commit is contained in:
Ajitem Sahasrabuddhe 2020-01-13 11:15:07 +05:30
parent 9c3c74b491
commit 300b9985aa

View File

@ -80,7 +80,7 @@ func expectFileContent(t *testing.T, file, expected string) {
data, err := ioutil.ReadFile(file) data, err := ioutil.ReadFile(file)
// Ignore windows line endings // Ignore windows line endings
// TODO: Replace with bytes.ReplaceAll when support for Go 1.11 is dropped // TODO: Replace with bytes.ReplaceAll when support for Go 1.11 is dropped
expected = string(bytes.Replace([]byte(expected), []byte("\r\n"), []byte("\n"), -1)) data = bytes.Replace(data, []byte("\r\n"), []byte("\n"), -1)
expect(t, err, nil) expect(t, err, nil)
expect(t, string(data), expected) expect(t, string(data), expected)
} }