Skip to content

Commit

Permalink
updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
lmittmann committed Jun 14, 2024
1 parent 6c07d69 commit 2488222
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,21 @@ func TestHandler(t *testing.T) {
},
{
Opts: &tint.Options{
NoColor: false,
NoColor: true,
},
F: func(l *slog.Logger) {
l.Info("test", "color", "\033[92m\"fully green quoted\"\033[0m")
l.Info("test", "color", "\033[92mgreen\033[0m")
},
Want: `Nov 10 23:00:00.000 INF test color=green`,
},
{
Opts: &tint.Options{
NoColor: true,
},
F: func(l *slog.Logger) {
l.Info("test", "color", "\033[92mgreen quoted\033[0m")
},
Want: "\033[2mNov 10 23:00:00.000\033[0m \033[92mINF\033[0m test \033[2mcolor=\033[0m\033[92m\"fully green quoted\"\033[0m",
Want: `Nov 10 23:00:00.000 INF test color="green quoted"`,
},
}

Expand Down

0 comments on commit 2488222

Please sign in to comment.