fix: route help and repeated-slash settings locally

This commit is contained in:
姚章浩
2026-08-13 14:39:56 +08:00
parent 44d9398c78
commit 0f30f8cec8
4 changed files with 25 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ func TestDetermineState(t *testing.T) {
}
func TestParseCommandStrict(t *testing.T) {
yes := []string{"/setting", "/settings", "/设置", "/setting 123456", "/setting language ja", "/setting support", "/setting question https://alidocs.dingtalk.com/i/nodes/abc"}
yes := []string{"/setting", "//setting", "/settings", "/设置", "/help", "//help", "/setting 123456", "/setting language ja", "//setting language en", "/setting support", "/setting question https://alidocs.dingtalk.com/i/nodes/abc"}
for _, raw := range yes {
if c, ok := ParseCommand(raw); !ok || c.Name == "" {
t.Fatalf("must match %q", raw)