package punctuation import ( "context" "testing" "go-whisper-api/config" ) func TestNop(t *testing.T) { r, err := New(config.Punctuation{Engine: "off"}) if err != nil { t.Fatal(err) } out, err := Apply(context.Background(), r, true, "hello world", "en") if err != nil { t.Fatal(err) } if out != "hello world" { t.Fatalf("got %q", out) } } func TestApply_disabled(t *testing.T) { r := Heuristic{} out, err := Apply(context.Background(), r, false, "hello", "en") if err != nil || out != "hello" { t.Fatalf("got %q err=%v", out, err) } } func TestNew_heuristic(t *testing.T) { r, err := New(config.Punctuation{Enabled: true, Engine: "heuristic"}) if err != nil { t.Fatal(err) } if !r.Active() { t.Fatal("expected active") } }