Tests for a name no token can spell

A dot is already rejected in a category, folder or field name. The token
grammar reserves three more characters: '|' separates a token's arms, '('
opens a function call, and '}' ends the token. A name carrying one resolves
by dot path and is advertised by List, yet no format can name it.

These pin the rejection, and one accepted case fixes the boundary: ')' on
its own is spellable, so it stays legal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
M
2026-08-30 23:03:12 +02:00
committed by lilleman-tw
parent 403d68de27
commit cc8f8db83f
2 changed files with 28 additions and 5 deletions
+1 -1
View File
@@ -405,7 +405,7 @@ func TestDottedTokenErrors(t *testing.T) {
},
"dotted field key": {
`{"format":"[{a.b}]","a.b":["V"]}`,
`contains a dot`,
`contains "."`,
},
}
for name, c := range rejected {