From cd044a3aed64bfd61a467cbc7d1aa3d84bf4760a Mon Sep 17 00:00:00 2001 From: Amit Saha Date: Thu, 24 Aug 2023 18:43:24 +0930 Subject: [PATCH] String CRs from expected windows golden file --- cli_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli_test.go b/cli_test.go index 17ea9bf..1bb6e78 100644 --- a/cli_test.go +++ b/cli_test.go @@ -8,6 +8,7 @@ import ( "path" "reflect" "runtime" + "strings" "testing" ) @@ -54,6 +55,10 @@ func TestCliUsage(t *testing.T) { } t.FailNow() } + expectedUsageString := string(expectedUsage) + // For windows + expectedUsage = []byte(strings.ReplaceAll(expectedUsageString, "\r\n", "\n")) + if !reflect.DeepEqual(expectedUsage, gotUsage) { t.Errorf("expected and got data mismatch. ..writing expected output to %[1]s", goldenFilepathNew) if err := writeExpectedGoldenFile(goldenFilepathNew, gotUsage); err != nil {