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:
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user