mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:50:43 +00:00
23 lines
417 B
Go
23 lines
417 B
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestTranslationPromptAddsGermanStyleRules(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
prompt := translationPrompt("en", "de", nil)
|
|
|
|
for _, want := range []string{
|
|
"Translate from English to German.",
|
|
"Sie/Ihr/Ihnen",
|
|
"Avoid informal “du/dein/dir”",
|
|
} {
|
|
if !strings.Contains(prompt, want) {
|
|
t.Fatalf("expected %q in German prompt:\n%s", want, prompt)
|
|
}
|
|
}
|
|
}
|