(t *testing.T)
| 132 | } |
| 133 | |
| 134 | func TestNewStdLogAtFatal(t *testing.T) { |
| 135 | withLogger(t, DebugLevel, []Option{AddCaller()}, func(l *Logger, logs *observer.ObservedLogs) { |
| 136 | stub := exit.WithStub(func() { |
| 137 | std, err := NewStdLogAt(l, FatalLevel) |
| 138 | require.NoError(t, err, "Unexpected error.") |
| 139 | std.Print("redirected") |
| 140 | checkStdLogMessage(t, "redirected", logs) |
| 141 | }) |
| 142 | assert.True(t, true, stub.Exited, "Expected Fatal logger call to terminate process.") |
| 143 | stub.Unstub() |
| 144 | }) |
| 145 | } |
| 146 | |
| 147 | func TestNewStdLogAtInvalid(t *testing.T) { |
| 148 | _, err := NewStdLogAt(NewNop(), zapcore.Level(99)) |
nothing calls this directly
no test coverage detected