metrics: fix TestExampleOpenTSB on windows

This commit is contained in:
Darioush Jalali 2023-09-14 17:28:48 -07:00
parent 65a17c00c7
commit f13dd464cc
No known key found for this signature in database
GPG key ID: 33AF152DB721A121

View file

@ -46,7 +46,8 @@ func TestExampleOpenTSB(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
if have, want := w.String(), string(wantB); have != want { want := strings.ReplaceAll(string(wantB), "\r\n", "\n")
if have := w.String(); have != want {
t.Errorf("\nhave:\n%v\nwant:\n%v\n", have, want) t.Errorf("\nhave:\n%v\nwant:\n%v\n", have, want)
t.Logf("have vs want:\n%v", findFirstDiffPos(have, want)) t.Logf("have vs want:\n%v", findFirstDiffPos(have, want))
} }