When tests fail, show source version of string (inc special chars)

This commit is contained in:
John Barton 2021-09-24 20:58:07 +10:00
parent 22f9782344
commit a4061f306a

View File

@ -35,7 +35,7 @@ func loadEnvAndCompareValues(t *testing.T, loader func(files ...string) error, e
envValue := os.Getenv(k)
v := expectedValues[k]
if envValue != v {
t.Errorf("Mismatch for key '%v': expected '%v' got '%v'", k, v, envValue)
t.Errorf("Mismatch for key '%v': expected '%#v' got '%#v'", k, v, envValue)
}
}
}