Advertise framework inspection commands in usage
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user