返回 DeepSeek-Reasonix
final_readiness_recovery_test.go
根目录 / internal / control / final_readiness_recovery_test.go
1 package control
2
3 import "testing"
4
5 func TestParseFinalReadinessRecoveryCommand(t *testing.T) {
6 tests := []struct {
7 input string
8 ok bool
9 want string
10 }{
11 {input: "/continue-checks", ok: true, want: defaultContinueChecksPrompt},
12 {input: " /continue-checks rerun only package tests ", ok: true, want: "rerun only package tests"},
13 {input: "/continue-checks-now", ok: false},
14 {input: "continue checks", ok: false},
15 }
16 for _, test := range tests {
17 got, ok := ParseFinalReadinessRecoveryCommand(test.input)
18 if ok != test.ok || got != test.want {
19 t.Errorf("ParseFinalReadinessRecoveryCommand(%q) = (%q, %v), want (%q, %v)", test.input, got, ok, test.want, test.ok)
20 }
21 }
22 }
23
23 lines GO