Skip to content

Commit

Permalink
Add test for array with newlines inside inline table
Browse files Browse the repository at this point in the history
Fixes #148
  • Loading branch information
arp242 committed Nov 17, 2023
1 parent 50aaf90 commit 04256ad
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/files-toml-1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,10 @@ invalid/table/redefine-1.toml
invalid/table/redefine-2.toml
invalid/table/redefine-3.toml
invalid/table/rrbrace.toml
invalid/table/super-twice.toml
invalid/table/text-after-table.toml
invalid/table/whitespace.toml
invalid/table/with-pound.toml
invalid/table/super-twice.toml
valid/array/array.json
valid/array/array.toml
valid/array/array-subtables.json
Expand Down Expand Up @@ -457,6 +457,8 @@ valid/implicit-groups.json
valid/implicit-groups.toml
valid/inline-table/array.json
valid/inline-table/array.toml
valid/inline-table/array-values.json
valid/inline-table/array-values.toml
valid/inline-table/bool.json
valid/inline-table/bool.toml
valid/inline-table/empty.json
Expand Down
4 changes: 3 additions & 1 deletion tests/files-toml-1.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@ invalid/table/redefine-1.toml
invalid/table/redefine-2.toml
invalid/table/redefine-3.toml
invalid/table/rrbrace.toml
invalid/table/super-twice.toml
invalid/table/text-after-table.toml
invalid/table/whitespace.toml
invalid/table/with-pound.toml
invalid/table/super-twice.toml
valid/array/array.json
valid/array/array.toml
valid/array/array-subtables.json
Expand Down Expand Up @@ -449,6 +449,8 @@ valid/implicit-groups.json
valid/implicit-groups.toml
valid/inline-table/array.json
valid/inline-table/array.toml
valid/inline-table/array-values.json
valid/inline-table/array-values.toml
valid/inline-table/bool.json
valid/inline-table/bool.toml
valid/inline-table/empty.json
Expand Down
27 changes: 27 additions & 0 deletions tests/valid/inline-table/array-values.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"a": {
"a": []
},
"b": {
"a": [
{
"type": "integer",
"value": "1"
},
{
"type": "integer",
"value": "2"
}
],
"b": [
{
"type": "integer",
"value": "3"
},
{
"type": "integer",
"value": "4"
}
]
}
}
13 changes: 13 additions & 0 deletions tests/valid/inline-table/array-values.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# "No newlines are allowed between the curly braces unless they are valid within
# a value"

a = { a = [
]}

b = { a = [
1,
2,
], b = [
3,
4,
]}

0 comments on commit 04256ad

Please sign in to comment.