forked from mirror/logrus
regex assertion rather than literal, for github path
This commit is contained in:
parent
3cb9e18ef9
commit
b1db1b9c67
|
@ -113,7 +113,7 @@ func TestReportCallerHelperDirect(t *testing.T) {
|
||||||
|
|
||||||
assert.Equal(t, "direct", fields["msg"])
|
assert.Equal(t, "direct", fields["msg"])
|
||||||
assert.Equal(t, "info", fields["level"])
|
assert.Equal(t, "info", fields["level"])
|
||||||
assert.Equal(t, "github.com/dclendenan/logrus.logSomething", fields["func"])
|
assert.Regexp(t, "github.com/.*/logrus.logSomething", fields["func"])
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestReportCallerHelperDirect - verify reference when logging from a function called via pointer
|
// TestReportCallerHelperDirect - verify reference when logging from a function called via pointer
|
||||||
|
@ -123,7 +123,7 @@ func TestReportCallerHelperViaPointer(t *testing.T) {
|
||||||
|
|
||||||
assert.Equal(t, "via pointer", fields["msg"])
|
assert.Equal(t, "via pointer", fields["msg"])
|
||||||
assert.Equal(t, "info", fields["level"])
|
assert.Equal(t, "info", fields["level"])
|
||||||
assert.Equal(t, "github.com/dclendenan/logrus.logSomething", fields["func"])
|
assert.Regexp(t, "github.com/.*/logrus.logSomething", fields["func"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPrint(t *testing.T) {
|
func TestPrint(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue