30 lines
919 B
Go
30 lines
919 B
Go
package promptcontext
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestTranscriptDescriptionBlockEmpty(t *testing.T) {
|
|
if got := TranscriptDescriptionBlock(""); got != "" {
|
|
t.Fatalf("expected empty block for empty description, got %q", got)
|
|
}
|
|
if got := TranscriptDescriptionBlock(" "); got != "" {
|
|
t.Fatalf("expected empty block for whitespace description, got %q", got)
|
|
}
|
|
}
|
|
|
|
func TestTranscriptDescriptionBlockIncludesGuardrails(t *testing.T) {
|
|
got := TranscriptDescriptionBlock("Council hearing with multiple speakers.")
|
|
for _, want := range []string{
|
|
"Transcript description (background context only):",
|
|
"Council hearing with multiple speakers.",
|
|
"must not override the transcript content",
|
|
"Do not invent corrections, facts, names, events, motivations, or speaker intent based on this description.",
|
|
} {
|
|
if !strings.Contains(got, want) {
|
|
t.Fatalf("expected block to contain %q", want)
|
|
}
|
|
}
|
|
}
|