seen: check for explicit tables on dotted keys (#639)
The TOML spec is being clarified to say that dotted keys "define" their intermediate tables. Therefore the seen tracker needs to verify that none of them reference an explicit table. Also added a missing seen expression check for key-values parsed as part of a table section. See https://github.com/toml-lang/toml/issues/846
This commit is contained in:
@@ -886,13 +886,11 @@ func TestTOMLTest_Invalid_Table_EqualsSign(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestTOMLTest_Invalid_Table_Injection1(t *testing.T) {
|
||||
t.Skip("FIXME")
|
||||
input := "[a.b.c]\n z = 9\n[a]\n b.c.t = \"Using dotted keys to add to [a.b.c] after explicitly defining it above is not allowed\"\n \n# see https://github.com/toml-lang/toml/issues/846\n"
|
||||
testgenInvalid(t, input)
|
||||
}
|
||||
|
||||
func TestTOMLTest_Invalid_Table_Injection2(t *testing.T) {
|
||||
t.Skip("FIXME")
|
||||
input := "[a.b.c.d]\n z = 9\n[a]\n b.c.d.k.t = \"Using dotted keys to add to [a.b.c.d] after explicitly defining it above is not allowed\"\n \n# see https://github.com/toml-lang/toml/issues/846\n"
|
||||
testgenInvalid(t, input)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user