Advertise framework inspection commands in usage

This commit is contained in:
2026-10-04 14:31:17 +00:00
parent 907fc51236
commit c233d03371
3 changed files with 45 additions and 1 deletions

View File

@@ -251,6 +251,32 @@ func TestParseServeArgsRejectsRuntimeOverrideFlags(t *testing.T) {
}
}
func TestUsageAdvertisesFrameworkConfigurationInspection(t *testing.T) {
code, stdout, usage := runCLICommand(t, Run, nil)
if code != ExitRuntimeError || stdout != "" {
t.Fatalf("usage exit/streams changed: code=%d stdout=%q", code, stdout)
}
var frameworkUsage string
for _, line := range strings.Split(usage, "\n") {
if strings.Contains(line, "inspect configuration") {
frameworkUsage = line
break
}
}
if frameworkUsage == "" {
t.Fatalf("usage omits framework configuration inspection: %s", usage)
}
for _, want := range []string{
"validate", "show", "sources", "explain",
"--config", "--config-overlay", "--promptkit-source", "--schema-dir", "--path",
} {
if !strings.Contains(frameworkUsage, want) {
t.Errorf("framework configuration usage omits %q: %s", want, frameworkUsage)
}
}
}
func TestUsageIncludesExecutionAndServeFlags(t *testing.T) {
var stderr bytes.Buffer
code := Run(nil, io.Discard, &stderr)