Skip to content

Commit

Permalink
make test portable on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Jan 3, 2022
1 parent 376d88f commit 855e9ff
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dotenv/godotenv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ func loadEnvAndCompareValues(t *testing.T, loader func(files ...string) error, e
t.Fatalf("Error loading %v", envFileName)
}

for k := range expectedValues {
envValue := os.Getenv(k)
v := expectedValues[k]
if envValue != v {
t.Errorf("Mismatch for key '%v': expected '%v' got '%v'", k, v, envValue)
for k, expected := range expectedValues {
actual := strings.ReplaceAll(os.Getenv(k), "\r\n", "\n")
if actual != expected {
t.Errorf("Mismatch for key '%v': expected '%v' got '%v'", k, expected, actual)
}
}
}
Expand Down

0 comments on commit 855e9ff

Please sign in to comment.