cfg := u.Config()
cfg.Theme = MonoTheme // Mono
+ cfg.Timeformat = nil
u.SetConfig(cfg)
m := NewAnnounceMsg("hello")
cfg.Timeformat = &timefmt
u.SetConfig(cfg)
- if got, want := cfg.Theme.Timestamp("foo"), `\e[38;05;245mfoo`+Reset; got != want {
+ if got, want := cfg.Theme.Timestamp("foo"), "foo"; got != want {
t.Errorf("Wrong timestamp formatting:\n got: %q\nwant: %q", got, want)
}
u.HandleMsg(u.ConsumeOne())
s.Read(&actual)
- expected = []byte(`\e[38;05;245mAA:BB` + Reset + ` [\e[38;05;88mfoo\e[0m] hello` + Newline)
+ expected = []byte(`AA:BB [foo] hello` + Newline)
if !reflect.DeepEqual(actual, expected) {
t.Errorf("Wrong screen output:\n Got: `%q`;\nWant: `%q`", actual, expected)
}