Complete resource inspection validation and coverage

This commit is contained in:
2026-11-06 15:34:21 +00:00
parent 19a0604874
commit f083ad5309
6 changed files with 61 additions and 19 deletions

View File

@@ -92,3 +92,15 @@ func TestTypedPromptSourceDefersValidation(t *testing.T) {
t.Fatalf("invalid final source: %v", err)
}
}
func TestNilTypedPromptSourceSuppliesEmptySequence(t *testing.T) {
source := promptkit.PromptSource("empty", nil)
engine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Main: &configkit.Input{Source: source}}}, promptkit.WithBundledOpenRouter(false))
if err != nil {
t.Fatal(err)
}
prompts, err := engine.ListPrompts(context.Background())
if err != nil || len(prompts) != 0 {
t.Fatalf("empty source = %v, %v", prompts, err)
}
}