Skip to content

Commit

Permalink
Add test data (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
hukkin committed Jan 29, 2022
1 parent 7349d78 commit 417f335
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a=true
[[a]]
2 changes: 2 additions & 0 deletions tests/data/extras/invalid/dotted-keys/access-non-table.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a = false
a.b = true
2 changes: 2 additions & 0 deletions tests/data/extras/invalid/inline-table/mutate.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a = { b = 1 }
a.b = 2
1 change: 1 addition & 0 deletions tests/data/extras/invalid/invalid-comment-char.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# form feed ( ) not allowed in comments
1 change: 1 addition & 0 deletions tests/data/extras/invalid/non-scalar-escaped.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a="\ud800"
2 changes: 1 addition & 1 deletion tests/data/extras/valid/array/open-parent-table.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent-table": {
"arr": {"type":"array","value":[{}]},
"arr": {"type":"array","value":[{},{}]},
"not-arr": {"type":"integer","value":"1"}
}
}
1 change: 1 addition & 0 deletions tests/data/extras/valid/array/open-parent-table.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[[parent-table.arr]]
[[parent-table.arr]]
[parent-table]
not-arr = 1
4 changes: 4 additions & 0 deletions tests/data/extras/valid/boolean.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"a": {"type":"bool","value":"true"},
"b": {"type":"bool","value":"false"}
}
2 changes: 2 additions & 0 deletions tests/data/extras/valid/boolean.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'a'=true
"b"=false
4 changes: 4 additions & 0 deletions tests/data/extras/valid/dates-and-times/datetimes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"local-dt": {"type":"datetime-local","value":"1988-10-27t01:01:01"},
"zulu-dt": {"type":"datetime","value":"1988-10-27t01:01:01z"}
}
2 changes: 2 additions & 0 deletions tests/data/extras/valid/dates-and-times/datetimes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
local-dt=1988-10-27t01:01:01
zulu-dt=1988-10-27t01:01:01z
2 changes: 2 additions & 0 deletions tests/data/extras/valid/dates-and-times/localtime.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"t":
{"type":"time-local","value":"00:00:00.999999"}}
1 change: 1 addition & 0 deletions tests/data/extras/valid/dates-and-times/localtime.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
t=00:00:00.99999999999999
6 changes: 4 additions & 2 deletions tests/data/extras/valid/five-quotes.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
{"five-quotes":
{"type":"string","value":"Closing with five quotes\n\"\""}}
{
"five-quotes": {"type":"string","value":"Closing with five quotes\n\"\""},
"four-quotes": {"type":"string","value":"Closing with four quotes\n\""}
}
3 changes: 3 additions & 0 deletions tests/data/extras/valid/five-quotes.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
five-quotes = """
Closing with five quotes
"""""
four-quotes = """
Closing with four quotes
""""
5 changes: 5 additions & 0 deletions tests/data/extras/valid/hex-char.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"a": {"type":"string","value":"a"},
"b": {"type":"string","value":"b"},
"c": {"type":"string","value":"c"}
}
3 changes: 3 additions & 0 deletions tests/data/extras/valid/hex-char.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a="\u0061"
b="\u0062"
c="\U00000063"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
beee = """
heeee
geeee\
geeee\
"""
7 changes: 7 additions & 0 deletions tests/data/extras/valid/trailing-comma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{"arr":
{"type":"array","value":
[
{"type":"integer","value":"1"}
]
}
}
1 change: 1 addition & 0 deletions tests/data/extras/valid/trailing-comma.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
arr=[1,]

0 comments on commit 417f335

Please sign in to comment.