Skip to content

Commit

Permalink
Add test with spacing inside inline tables
Browse files Browse the repository at this point in the history
Fixes #146
  • Loading branch information
arp242 committed Oct 18, 2023
1 parent 78f8c61 commit 23c30e9
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/files-toml-1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ valid/inline-table/multiline.json
valid/inline-table/multiline.toml
valid/inline-table/nest.json
valid/inline-table/nest.toml
valid/inline-table/spaces.json
valid/inline-table/spaces.toml
valid/integer/integer.json
valid/integer/integer.toml
valid/integer/literals.json
Expand Down
2 changes: 2 additions & 0 deletions tests/files-toml-1.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ valid/inline-table/nest.json
valid/inline-table/nest.toml
valid/inline-table/newline.json
valid/inline-table/newline.toml
valid/inline-table/spaces.json
valid/inline-table/spaces.toml
valid/integer/integer.json
valid/integer/integer.toml
valid/integer/literals.json
Expand Down
50 changes: 50 additions & 0 deletions tests/valid/inline-table/spaces.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"clap-1": {
"features": [
{
"type": "string",
"value": "derive"
},
{
"type": "string",
"value": "cargo"
}
],
"version": {
"type": "string",
"value": "4"
}
},
"clap-2": {
"features": [
{
"type": "string",
"value": "derive"
},
{
"type": "string",
"value": "cargo"
}
],
"nest": {
"a": {
"type": "string",
"value": "x"
},
"b": [
{
"type": "float",
"value": "1.5"
},
{
"type": "float",
"value": "9"
}
]
},
"version": {
"type": "string",
"value": "4"
}
}
}
5 changes: 5 additions & 0 deletions tests/valid/inline-table/spaces.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://github.com/toml-lang/toml-test/issues/146
clap-1 = { version = "4" , features = ["derive", "cargo"] }

# Contains some literal tabs!
clap-2 = { version = "4" , features = [ "derive" , "cargo" ] , nest = { "a" = 'x' , 'b' = [ 1.5 , 9.0 ] } }

0 comments on commit 23c30e9

Please sign in to comment.