(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestSearchPathScopeValidation(t *testing.T) { |
| 23 | err := search(searchCmd, []string{"query", "no-slash"}) |
| 24 | if err == nil { |
| 25 | t.Fatal("expected error for path-scope without leading slash") |
| 26 | } |
| 27 | details := jsonErrorDetails(err) |
| 28 | if details["argument"] != "path-scope" || details["path"] != "no-slash" { |
| 29 | t.Fatalf("details = %#v, want path-scope argument and path", details) |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func TestSearchRejectsExtraArgs(t *testing.T) { |
| 34 | err := search(searchCmd, []string{"query", "/docs", "extra"}) |
nothing calls this directly
no test coverage detected