Skip to content

Commit

Permalink
String CRs from expected windows golden file
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsaha committed Aug 24, 2023
1 parent 89221d4 commit cd044a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"path"
"reflect"
"runtime"
"strings"
"testing"
)

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit cd044a3

Please sign in to comment.