Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsaha committed Aug 24, 2023
1 parent 89221d4 commit 6ebd626
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 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 @@ -45,6 +46,7 @@ func TestCliUsage(t *testing.T) {
}

gotUsage := stderr.Bytes()
t.Log(strings.Index(string(gotUsage), "\r\n"))

expectedUsage, err := os.ReadFile(goldenFilepath)
if err != nil {
Expand All @@ -54,6 +56,8 @@ func TestCliUsage(t *testing.T) {
}
t.FailNow()
}
t.Log(strings.Index(string(expectedUsage), "\r\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 6ebd626

Please sign in to comment.