Skip to content

Commit

Permalink
Make test for stdlib caller skip more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Shah committed Mar 14, 2017
1 parent 3c34bc4 commit d8bed52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion global_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ func TestNewStdLog(t *testing.T) {
entry := logs.AllUntimed()[0]
assert.Equal(t, []zapcore.Field{}, entry.Context, "Unexpected entry context.")
assert.Equal(t, "redirected", entry.Entry.Message, "Unexpected entry message.")
assert.Contains(t, entry.Entry.Caller.File, "global_test.go", "Unexpected caller annotation.")
assert.Regexp(
t,
`go.uber.org/zap/global_test.go:\d+$`,
entry.Entry.Caller.String(),
"Unexpected caller annotation.",
)
})
}

Expand Down

0 comments on commit d8bed52

Please sign in to comment.