Accept one spelling per draw, and reject a path into a repeating level

This commit is contained in:
M
2026-08-30 20:38:52 +02:00
committed by lilleman-tw
parent 97ecbe208f
commit f7165274c7
5 changed files with 81 additions and 26 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ func TestRenderingALevelAndReadingIntoItIsRejected(t *testing.T) {
// other rendered — so the pair is a load error rather than a shape whose two
// halves can disagree.
rejected := map[string]string{
"bare head beside a path": `{"format":"{p} + {p.first}","p":[{"format":"{first}","first":["Anna","Bo"]}]}`,
"bare head beside a path": `{"format":"{p} + {p.first}","p":[{"format":"{first}","first":["Anna","Bo"]}]}`,
"prefix path beside a path": `{"format":"{p.addr}|{p.addr.city}","p":[{"format":"{addr}","addr":[` +
`{"format":"{city}","city":["Kiruna","Boden"]},{"format":"{city}","city":["Malmö","Lund"]}]}]}`,
"either order": `{"format":"{p.first} + {p}","p":[{"format":"{first}","first":["Anna","Bo"]}]}`,