Tests: one fence sequence, inline folder sigils rejected, JSON string arguments, quoted names, and shape misuse before load

This commit is contained in:
2026-09-03 20:31:49 +02:00
parent 841513bb27
commit 7c7bee5cd9
4 changed files with 65 additions and 15 deletions
+10
View File
@@ -47,3 +47,13 @@ func TestInertObjectIsRejected(t *testing.T) {
}
}
}
func TestInlineFolderSigilsAreRejected(t *testing.T) {
f := shipped(t)
for _, input := range []string{"{.sv_SE.person.last}", "{..sv_SE.person.last}"} {
_, err := f.NewTemplate(input)
if err == nil || !strings.Contains(err.Error(), "write {/sv_SE.person.last}") {
t.Errorf("NewTemplate(%q) = %v, want an error naming the root spelling", input, err)
}
}
}