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
+4 -2
View File
@@ -275,8 +275,6 @@ func TestNewErrors(t *testing.T) {
map[string]string{"a|b": `"1"`},
`category "a|b" contains "|"`,
},
// A bracket is not a token-grammar character, but the CLI reads an argument
// starting with [ as a JSON array, so a name carrying one would be misread.
"field name with a bracket": {
map[string]string{"a": `{"format":"{x}","x":"1","b[c":"2"}`},
`field "b[c" contains "["`,
@@ -285,6 +283,10 @@ func TestNewErrors(t *testing.T) {
map[string]string{"[abc]": `"1"`},
`category "[abc]" contains "["`,
},
"field name with a quote": {
map[string]string{"a": `{"format":"{x}","x":"1","b\"c":"2"}`},
`field "b\"c" contains "\""`,
},
// An empty name is not a path segment, so List never offered it — while a
// bare {}, a trailing dot in Fake("a.") and a {/a.} reference all reached
// it. The engine accepted spellings it would never advertise.