Skip to content

Commit

Permalink
Clarify the comments on invalid/table/injection-* tests
Browse files Browse the repository at this point in the history
Not super-clear *why* these are invalid at a glance, and that issue is
long. Summarize the issue in a comment.
  • Loading branch information
arp242 committed Nov 24, 2021
1 parent 8baf830 commit 5c4b02c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
15 changes: 13 additions & 2 deletions tests/invalid/table/injection-1.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# First a.b.c defines a table: a.b.c = {z=9}
#
# Then we define a.b.c.t = "str" to add a str to the above table, making it:
#
# a.b.c = {z=9, t="..."}
#
# While this makes sense, logically, it was decided this is not valid TOML as
# it's too confusing/convoluted.
#
# See: https://github.com/toml-lang/toml/issues/846
# https://github.com/toml-lang/toml/pull/859

[a.b.c]
z = 9

[a]
b.c.t = "Using dotted keys to add to [a.b.c] after explicitly defining it above is not allowed"

# see https://github.com/toml-lang/toml/issues/846
6 changes: 4 additions & 2 deletions tests/invalid/table/injection-2.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This is the same issue as in injection-1.toml, except that nests one level
# deeper. See that file for a more complete description.

[a.b.c.d]
z = 9

[a]
b.c.d.k.t = "Using dotted keys to add to [a.b.c.d] after explicitly defining it above is not allowed"

# see https://github.com/toml-lang/toml/issues/846

0 comments on commit 5c4b02c

Please # to comment.