feat: update smoke profile area handling

This commit is contained in:
你çšnepiedg
2026-03-19 15:41:26 +08:00
parent 9278260681
commit 515fba0b55
6 changed files with 60 additions and 0 deletions
@@ -106,3 +106,23 @@ func TestIsSmokeProfileCompleted(t *testing.T) {
t.Fatalf("isSmokeProfileCompleted: expected false when quit_motivations missing")
}
}
func TestNormalizedSmokeMode(t *testing.T) {
t.Parallel()
cases := []struct {
in string
want string
}{
{in: SmokeModeQuit, want: SmokeModeQuit},
{in: SmokeModeRecord, want: SmokeModeRecord},
{in: "", want: SmokeModeRecord},
{in: "unknown", want: SmokeModeRecord},
}
for _, c := range cases {
if got := normalizedSmokeMode(c.in); got != c.want {
t.Fatalf("normalizedSmokeMode(%q): got %q, want %q", c.in, got, c.want)
}
}
}