diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:21:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:21:29 +0000 |
commit | 683f1f3ddde13390781318b9fe4a6841ea35d145 (patch) | |
tree | c21fddf99f2e5233bb3f22bbafd0d711fe7c5d95 /tests/data/invalid/burntsushi | |
parent | Initial commit. (diff) | |
download | python-tomli-683f1f3ddde13390781318b9fe4a6841ea35d145.tar.xz python-tomli-683f1f3ddde13390781318b9fe4a6841ea35d145.zip |
Adding upstream version 2.0.1.upstream/2.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/data/invalid/burntsushi')
212 files changed, 445 insertions, 0 deletions
diff --git a/tests/data/invalid/burntsushi/COPYING b/tests/data/invalid/burntsushi/COPYING new file mode 100644 index 0000000..93b2202 --- /dev/null +++ b/tests/data/invalid/burntsushi/COPYING @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 TOML authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/tests/data/invalid/burntsushi/invalid/array/missing-separator.toml b/tests/data/invalid/burntsushi/invalid/array/missing-separator.toml new file mode 100644 index 0000000..ab3791a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/missing-separator.toml @@ -0,0 +1 @@ +wrong = [ 1 2 3 ] diff --git a/tests/data/invalid/burntsushi/invalid/array/no-close-2.toml b/tests/data/invalid/burntsushi/invalid/array/no-close-2.toml new file mode 100644 index 0000000..2f46123 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/no-close-2.toml @@ -0,0 +1 @@ +x = [42 # diff --git a/tests/data/invalid/burntsushi/invalid/array/no-close-table-2.toml b/tests/data/invalid/burntsushi/invalid/array/no-close-table-2.toml new file mode 100644 index 0000000..827c128 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/no-close-table-2.toml @@ -0,0 +1 @@ +x = [{ key = 42 # diff --git a/tests/data/invalid/burntsushi/invalid/array/no-close-table.toml b/tests/data/invalid/burntsushi/invalid/array/no-close-table.toml new file mode 100644 index 0000000..7b077be --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/no-close-table.toml @@ -0,0 +1 @@ +x = [{ key = 42 diff --git a/tests/data/invalid/burntsushi/invalid/array/no-close.toml b/tests/data/invalid/burntsushi/invalid/array/no-close.toml new file mode 100644 index 0000000..032ebcc --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/no-close.toml @@ -0,0 +1 @@ +long_array = [ 1, 2, 3 diff --git a/tests/data/invalid/burntsushi/invalid/array/tables-1.toml b/tests/data/invalid/burntsushi/invalid/array/tables-1.toml new file mode 100644 index 0000000..01d4d13 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/tables-1.toml @@ -0,0 +1,4 @@ +# INVALID TOML DOC +fruit = [] + +[[fruit]] # Not allowed diff --git a/tests/data/invalid/burntsushi/invalid/array/tables-2.toml b/tests/data/invalid/burntsushi/invalid/array/tables-2.toml new file mode 100644 index 0000000..a77b0e4 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/tables-2.toml @@ -0,0 +1,10 @@ +# INVALID TOML DOC +[[fruit]] + name = "apple" + + [[fruit.variety]] + name = "red delicious" + + # This table conflicts with the previous table + [fruit.variety] + name = "granny smith" diff --git a/tests/data/invalid/burntsushi/invalid/array/text-after-array-entries.toml b/tests/data/invalid/burntsushi/invalid/array/text-after-array-entries.toml new file mode 100644 index 0000000..1a72890 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/text-after-array-entries.toml @@ -0,0 +1,4 @@ +array = [ + "Is there life after an array separator?", No + "Entry" +] diff --git a/tests/data/invalid/burntsushi/invalid/array/text-before-array-separator.toml b/tests/data/invalid/burntsushi/invalid/array/text-before-array-separator.toml new file mode 100644 index 0000000..9b06a39 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/text-before-array-separator.toml @@ -0,0 +1,4 @@ +array = [ + "Is there life before an array separator?" No, + "Entry" +] diff --git a/tests/data/invalid/burntsushi/invalid/array/text-in-array.toml b/tests/data/invalid/burntsushi/invalid/array/text-in-array.toml new file mode 100644 index 0000000..a6a6c42 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/array/text-in-array.toml @@ -0,0 +1,5 @@ +array = [ + "Entry 1", + I don't belong, + "Entry 2", +] diff --git a/tests/data/invalid/burntsushi/invalid/bool/mixed-case.toml b/tests/data/invalid/burntsushi/invalid/bool/mixed-case.toml new file mode 100644 index 0000000..41d995a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/bool/mixed-case.toml @@ -0,0 +1 @@ +valid = False diff --git a/tests/data/invalid/burntsushi/invalid/bool/wrong-case-false.toml b/tests/data/invalid/burntsushi/invalid/bool/wrong-case-false.toml new file mode 100644 index 0000000..3982220 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/bool/wrong-case-false.toml @@ -0,0 +1 @@ +b = FALSE diff --git a/tests/data/invalid/burntsushi/invalid/bool/wrong-case-true.toml b/tests/data/invalid/burntsushi/invalid/bool/wrong-case-true.toml new file mode 100644 index 0000000..85e34c5 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/bool/wrong-case-true.toml @@ -0,0 +1 @@ +a = TRUE diff --git a/tests/data/invalid/burntsushi/invalid/control/bare-null.toml b/tests/data/invalid/burntsushi/invalid/control/bare-null.toml Binary files differnew file mode 100644 index 0000000..cf15002 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/bare-null.toml diff --git a/tests/data/invalid/burntsushi/invalid/control/comment-cr.toml b/tests/data/invalid/burntsushi/invalid/control/comment-cr.toml new file mode 100644 index 0000000..3ce1cb4 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/comment-cr.toml @@ -0,0 +1 @@ +comment-cr = "Carriage return in comment" #
a=1 diff --git a/tests/data/invalid/burntsushi/invalid/control/comment-del.toml b/tests/data/invalid/burntsushi/invalid/control/comment-del.toml new file mode 100644 index 0000000..fb90400 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/comment-del.toml @@ -0,0 +1 @@ +comment-del = "0x7f" # diff --git a/tests/data/invalid/burntsushi/invalid/control/comment-lf.toml b/tests/data/invalid/burntsushi/invalid/control/comment-lf.toml new file mode 100644 index 0000000..f6e963e --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/comment-lf.toml @@ -0,0 +1 @@ +comment-lf = "ctrl-P" # diff --git a/tests/data/invalid/burntsushi/invalid/control/comment-null.toml b/tests/data/invalid/burntsushi/invalid/control/comment-null.toml Binary files differnew file mode 100644 index 0000000..2c90372 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/comment-null.toml diff --git a/tests/data/invalid/burntsushi/invalid/control/comment-us.toml b/tests/data/invalid/burntsushi/invalid/control/comment-us.toml new file mode 100644 index 0000000..c685b79 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/comment-us.toml @@ -0,0 +1 @@ +comment-us = "ctrl-_" # diff --git a/tests/data/invalid/burntsushi/invalid/control/control.multi b/tests/data/invalid/burntsushi/invalid/control/control.multi Binary files differnew file mode 100644 index 0000000..705b58a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/control.multi diff --git a/tests/data/invalid/burntsushi/invalid/control/multi-del.toml b/tests/data/invalid/burntsushi/invalid/control/multi-del.toml new file mode 100644 index 0000000..6629ae3 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/multi-del.toml @@ -0,0 +1 @@ +multi-del = """null""" diff --git a/tests/data/invalid/burntsushi/invalid/control/multi-lf.toml b/tests/data/invalid/burntsushi/invalid/control/multi-lf.toml new file mode 100644 index 0000000..f207d33 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/multi-lf.toml @@ -0,0 +1 @@ +multi-lf = """null""" diff --git a/tests/data/invalid/burntsushi/invalid/control/multi-null.toml b/tests/data/invalid/burntsushi/invalid/control/multi-null.toml Binary files differnew file mode 100644 index 0000000..ac6cb46 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/multi-null.toml diff --git a/tests/data/invalid/burntsushi/invalid/control/multi-us.toml b/tests/data/invalid/burntsushi/invalid/control/multi-us.toml new file mode 100644 index 0000000..b923ca9 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/multi-us.toml @@ -0,0 +1 @@ +multi-us = """null""" diff --git a/tests/data/invalid/burntsushi/invalid/control/rawmulti-del.toml b/tests/data/invalid/burntsushi/invalid/control/rawmulti-del.toml new file mode 100644 index 0000000..17cde07 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/rawmulti-del.toml @@ -0,0 +1 @@ +rawmulti-del = '''null''' diff --git a/tests/data/invalid/burntsushi/invalid/control/rawmulti-lf.toml b/tests/data/invalid/burntsushi/invalid/control/rawmulti-lf.toml new file mode 100644 index 0000000..360d489 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/rawmulti-lf.toml @@ -0,0 +1 @@ +rawmulti-lf = '''null''' diff --git a/tests/data/invalid/burntsushi/invalid/control/rawmulti-null.toml b/tests/data/invalid/burntsushi/invalid/control/rawmulti-null.toml Binary files differnew file mode 100644 index 0000000..1b5bd09 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/rawmulti-null.toml diff --git a/tests/data/invalid/burntsushi/invalid/control/rawmulti-us.toml b/tests/data/invalid/burntsushi/invalid/control/rawmulti-us.toml new file mode 100644 index 0000000..0251420 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/rawmulti-us.toml @@ -0,0 +1 @@ +rawmulti-us = '''null''' diff --git a/tests/data/invalid/burntsushi/invalid/control/rawstring-del.toml b/tests/data/invalid/burntsushi/invalid/control/rawstring-del.toml new file mode 100644 index 0000000..8d83ba8 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/rawstring-del.toml @@ -0,0 +1 @@ +rawstring-del = 'null' diff --git a/tests/data/invalid/burntsushi/invalid/control/rawstring-lf.toml b/tests/data/invalid/burntsushi/invalid/control/rawstring-lf.toml new file mode 100644 index 0000000..237470a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/rawstring-lf.toml @@ -0,0 +1 @@ +rawstring-lf = 'null' diff --git a/tests/data/invalid/burntsushi/invalid/control/rawstring-null.toml b/tests/data/invalid/burntsushi/invalid/control/rawstring-null.toml Binary files differnew file mode 100644 index 0000000..2d8d0b4 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/rawstring-null.toml diff --git a/tests/data/invalid/burntsushi/invalid/control/rawstring-us.toml b/tests/data/invalid/burntsushi/invalid/control/rawstring-us.toml new file mode 100644 index 0000000..76cb08c --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/rawstring-us.toml @@ -0,0 +1 @@ +rawstring-us = 'null' diff --git a/tests/data/invalid/burntsushi/invalid/control/string-bs.toml b/tests/data/invalid/burntsushi/invalid/control/string-bs.toml new file mode 100644 index 0000000..0061c48 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/string-bs.toml @@ -0,0 +1 @@ +string-bs = "backspace" diff --git a/tests/data/invalid/burntsushi/invalid/control/string-del.toml b/tests/data/invalid/burntsushi/invalid/control/string-del.toml new file mode 100644 index 0000000..bc0ec7f --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/string-del.toml @@ -0,0 +1 @@ +string-del = "null" diff --git a/tests/data/invalid/burntsushi/invalid/control/string-lf.toml b/tests/data/invalid/burntsushi/invalid/control/string-lf.toml new file mode 100644 index 0000000..0cf9218 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/string-lf.toml @@ -0,0 +1 @@ +string-lf = "null" diff --git a/tests/data/invalid/burntsushi/invalid/control/string-null.toml b/tests/data/invalid/burntsushi/invalid/control/string-null.toml Binary files differnew file mode 100644 index 0000000..821c72c --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/string-null.toml diff --git a/tests/data/invalid/burntsushi/invalid/control/string-us.toml b/tests/data/invalid/burntsushi/invalid/control/string-us.toml new file mode 100644 index 0000000..af31f57 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/control/string-us.toml @@ -0,0 +1 @@ +string-us = "null" diff --git a/tests/data/invalid/burntsushi/invalid/datetime/hour-over.toml b/tests/data/invalid/burntsushi/invalid/datetime/hour-over.toml new file mode 100644 index 0000000..d4b89b6 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/hour-over.toml @@ -0,0 +1,2 @@ +# time-hour = 2DIGIT ; 00-23 +d = 2006-01-01T24:00:00-00:00 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/mday-over.toml b/tests/data/invalid/burntsushi/invalid/datetime/mday-over.toml new file mode 100644 index 0000000..600a409 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/mday-over.toml @@ -0,0 +1,3 @@ +# date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on +# ; month/year +d = 2006-01-32T00:00:00-00:00 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/mday-under.toml b/tests/data/invalid/burntsushi/invalid/datetime/mday-under.toml new file mode 100644 index 0000000..689fc98 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/mday-under.toml @@ -0,0 +1,3 @@ +# date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on +# ; month/year +d = 2006-01-00T00:00:00-00:00 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/minute-over.toml b/tests/data/invalid/burntsushi/invalid/datetime/minute-over.toml new file mode 100644 index 0000000..1532d79 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/minute-over.toml @@ -0,0 +1,2 @@ +# time-minute = 2DIGIT ; 00-59 +d = 2006-01-01T00:60:00-00:00 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/month-over.toml b/tests/data/invalid/burntsushi/invalid/datetime/month-over.toml new file mode 100644 index 0000000..c7d40c9 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/month-over.toml @@ -0,0 +1,2 @@ +# date-month = 2DIGIT ; 01-12 +d = 2006-13-01T00:00:00-00:00 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/month-under.toml b/tests/data/invalid/burntsushi/invalid/datetime/month-under.toml new file mode 100644 index 0000000..503f60a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/month-under.toml @@ -0,0 +1,2 @@ +# date-month = 2DIGIT ; 01-12 +d = 2007-00-01T00:00:00-00:00 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/no-leads-with-milli.toml b/tests/data/invalid/burntsushi/invalid/datetime/no-leads-with-milli.toml new file mode 100644 index 0000000..6e3d2e3 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/no-leads-with-milli.toml @@ -0,0 +1,2 @@ +# Day "5" instead of "05"; the leading zero is required. +with-milli = 1987-07-5T17:45:00.12Z diff --git a/tests/data/invalid/burntsushi/invalid/datetime/no-leads.toml b/tests/data/invalid/burntsushi/invalid/datetime/no-leads.toml new file mode 100644 index 0000000..6700d1c --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/no-leads.toml @@ -0,0 +1,2 @@ +# Month "7" instead of "07"; the leading zero is required. +no-leads = 1987-7-05T17:45:00Z diff --git a/tests/data/invalid/burntsushi/invalid/datetime/no-secs.toml b/tests/data/invalid/burntsushi/invalid/datetime/no-secs.toml new file mode 100644 index 0000000..bbd196a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/no-secs.toml @@ -0,0 +1,2 @@ +# No seconds in time. +no-secs = 1987-07-05T17:45Z diff --git a/tests/data/invalid/burntsushi/invalid/datetime/no-t.toml b/tests/data/invalid/burntsushi/invalid/datetime/no-t.toml new file mode 100644 index 0000000..8d87260 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/no-t.toml @@ -0,0 +1,2 @@ +# No "t" or "T" between the date and time. +no-t = 1987-07-0517:45:00Z diff --git a/tests/data/invalid/burntsushi/invalid/datetime/second-over.toml b/tests/data/invalid/burntsushi/invalid/datetime/second-over.toml new file mode 100644 index 0000000..4921704 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/second-over.toml @@ -0,0 +1,3 @@ +# time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second +# ; rules +d = 2006-01-01T00:00:61-00:00 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/time-no-leads-2.toml b/tests/data/invalid/burntsushi/invalid/datetime/time-no-leads-2.toml new file mode 100644 index 0000000..d7b8459 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/time-no-leads-2.toml @@ -0,0 +1,2 @@ +# Leading 0 is always required. +d = 01:32:0 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/time-no-leads.toml b/tests/data/invalid/burntsushi/invalid/datetime/time-no-leads.toml new file mode 100644 index 0000000..8ad722a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/time-no-leads.toml @@ -0,0 +1,2 @@ +# Leading 0 is always required. +d = 1:32:00 diff --git a/tests/data/invalid/burntsushi/invalid/datetime/trailing-t.toml b/tests/data/invalid/burntsushi/invalid/datetime/trailing-t.toml new file mode 100644 index 0000000..38ee1db --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/datetime/trailing-t.toml @@ -0,0 +1,2 @@ +# Date cannot end with trailing T +d = 2006-01-30T diff --git a/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-at-end.toml b/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-at-end.toml new file mode 100644 index 0000000..df5f0b0 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-at-end.toml @@ -0,0 +1,5 @@ +# There is a 0xda at after the quotes, and no EOL at the end of the file. +# +# This is a bit of an edge case: This indicates there should be two bytes +# (0b1101_1010) but there is no byte to follow because it's the end of the file. +x = """"""Ú
\ No newline at end of file diff --git a/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-in-comment.toml b/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-in-comment.toml new file mode 100644 index 0000000..816fa46 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-in-comment.toml @@ -0,0 +1 @@ +# à diff --git a/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-in-string.toml b/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-in-string.toml new file mode 100644 index 0000000..6d376fb --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/encoding/bad-utf8-in-string.toml @@ -0,0 +1,2 @@ +# The following line contains an invalid UTF-8 sequence. +bad = "Ã" diff --git a/tests/data/invalid/burntsushi/invalid/encoding/bom-not-at-start-1.toml b/tests/data/invalid/burntsushi/invalid/encoding/bom-not-at-start-1.toml new file mode 100644 index 0000000..effe1f2 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/encoding/bom-not-at-start-1.toml @@ -0,0 +1 @@ +bom-not-at-start ÿý diff --git a/tests/data/invalid/burntsushi/invalid/encoding/bom-not-at-start-2.toml b/tests/data/invalid/burntsushi/invalid/encoding/bom-not-at-start-2.toml new file mode 100644 index 0000000..71e52b4 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/encoding/bom-not-at-start-2.toml @@ -0,0 +1 @@ +bom-not-at-start= ÿý diff --git a/tests/data/invalid/burntsushi/invalid/encoding/utf16-bom.toml b/tests/data/invalid/burntsushi/invalid/encoding/utf16-bom.toml Binary files differnew file mode 100644 index 0000000..95b5f96 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/encoding/utf16-bom.toml diff --git a/tests/data/invalid/burntsushi/invalid/encoding/utf16.toml b/tests/data/invalid/burntsushi/invalid/encoding/utf16.toml Binary files differnew file mode 100644 index 0000000..de3cbb2 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/encoding/utf16.toml diff --git a/tests/data/invalid/burntsushi/invalid/float/double-point-1.toml b/tests/data/invalid/burntsushi/invalid/float/double-point-1.toml new file mode 100644 index 0000000..2105fa9 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/double-point-1.toml @@ -0,0 +1 @@ +double-point-1 = 0..1 diff --git a/tests/data/invalid/burntsushi/invalid/float/double-point-2.toml b/tests/data/invalid/burntsushi/invalid/float/double-point-2.toml new file mode 100644 index 0000000..1ef3d0b --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/double-point-2.toml @@ -0,0 +1 @@ +double-point-2 = 0.1.2 diff --git a/tests/data/invalid/burntsushi/invalid/float/exp-double-e-1.toml b/tests/data/invalid/burntsushi/invalid/float/exp-double-e-1.toml new file mode 100644 index 0000000..ee568ce --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/exp-double-e-1.toml @@ -0,0 +1 @@ +exp-double-e-1 = 1ee2 diff --git a/tests/data/invalid/burntsushi/invalid/float/exp-double-e-2.toml b/tests/data/invalid/burntsushi/invalid/float/exp-double-e-2.toml new file mode 100644 index 0000000..8fb0158 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/exp-double-e-2.toml @@ -0,0 +1 @@ +exp-double-e-2 = 1e2e3 diff --git a/tests/data/invalid/burntsushi/invalid/float/exp-double-us.toml b/tests/data/invalid/burntsushi/invalid/float/exp-double-us.toml new file mode 100644 index 0000000..63f94e6 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/exp-double-us.toml @@ -0,0 +1 @@ +exp-double-us = 1e__23 diff --git a/tests/data/invalid/burntsushi/invalid/float/exp-leading-us.toml b/tests/data/invalid/burntsushi/invalid/float/exp-leading-us.toml new file mode 100644 index 0000000..1426f36 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/exp-leading-us.toml @@ -0,0 +1 @@ +exp-leading-us = 1e_23 diff --git a/tests/data/invalid/burntsushi/invalid/float/exp-point-1.toml b/tests/data/invalid/burntsushi/invalid/float/exp-point-1.toml new file mode 100644 index 0000000..569590b --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/exp-point-1.toml @@ -0,0 +1 @@ +exp-point-1 = 1e2.3 diff --git a/tests/data/invalid/burntsushi/invalid/float/exp-point-2.toml b/tests/data/invalid/burntsushi/invalid/float/exp-point-2.toml new file mode 100644 index 0000000..4a5e1d4 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/exp-point-2.toml @@ -0,0 +1 @@ +exp-point-2 = 1.e2 diff --git a/tests/data/invalid/burntsushi/invalid/float/exp-trailing-us.toml b/tests/data/invalid/burntsushi/invalid/float/exp-trailing-us.toml new file mode 100644 index 0000000..07c0641 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/exp-trailing-us.toml @@ -0,0 +1 @@ +exp-trailing-us = 1e_23_ diff --git a/tests/data/invalid/burntsushi/invalid/float/float.multi b/tests/data/invalid/burntsushi/invalid/float/float.multi new file mode 100644 index 0000000..0708195 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/float.multi @@ -0,0 +1,40 @@ +leading-zero = 03.14 +leading-zero-neg = -03.14 +leading-zero-plus = +03.14 + +leading-point = .12345 +leading-point-neg = -.12345 +leading-point-plus = +.12345 + +trailing-point = 1. +trailing-point-min = -1. +trailing-point-plus = +1. + +trailing-us = 1.2_ +leading-us = _1.2 +us-before-point = 1_.2 +us-after-point = 1._2 + +double-point-1 = 0..1 +double-point-2 = 0.1.2 + +exp-point-1 = 1e2.3 +exp-point-2 = 1.e2 + +exp-double-e-1 = 1ee2 +exp-double-e-2 = 1e2e3 + +exp-leading-us = 1e_23 +exp-trailing-us = 1e_23_ +exp-double-us = 1e__23 + +inf-incomplete-1 = in +inf-incomplete-2 = +in +inf-incomplete-3 = -in + +nan-incomplete-1 = na +nan-incomplete-2 = +na +nan-incomplete-3 = -na + +nan_underscore = na_n +inf_underscore = in_f diff --git a/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-1.toml b/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-1.toml new file mode 100644 index 0000000..2c9ef59 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-1.toml @@ -0,0 +1 @@ +inf-incomplete-1 = in diff --git a/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-2.toml b/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-2.toml new file mode 100644 index 0000000..afda712 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-2.toml @@ -0,0 +1 @@ +inf-incomplete-2 = +in diff --git a/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-3.toml b/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-3.toml new file mode 100644 index 0000000..bd82738 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/inf-incomplete-3.toml @@ -0,0 +1 @@ +inf-incomplete-3 = -in diff --git a/tests/data/invalid/burntsushi/invalid/float/inf_underscore.toml b/tests/data/invalid/burntsushi/invalid/float/inf_underscore.toml new file mode 100644 index 0000000..8e6ab17 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/inf_underscore.toml @@ -0,0 +1 @@ +inf_underscore = in_f diff --git a/tests/data/invalid/burntsushi/invalid/float/leading-point-neg.toml b/tests/data/invalid/burntsushi/invalid/float/leading-point-neg.toml new file mode 100644 index 0000000..74c526f --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/leading-point-neg.toml @@ -0,0 +1 @@ +leading-point-neg = -.12345 diff --git a/tests/data/invalid/burntsushi/invalid/float/leading-point-plus.toml b/tests/data/invalid/burntsushi/invalid/float/leading-point-plus.toml new file mode 100644 index 0000000..85e23a2 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/leading-point-plus.toml @@ -0,0 +1 @@ +leading-point-plus = +.12345 diff --git a/tests/data/invalid/burntsushi/invalid/float/leading-point.toml b/tests/data/invalid/burntsushi/invalid/float/leading-point.toml new file mode 100644 index 0000000..a3c29b9 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/leading-point.toml @@ -0,0 +1 @@ +leading-point = .12345 diff --git a/tests/data/invalid/burntsushi/invalid/float/leading-us.toml b/tests/data/invalid/burntsushi/invalid/float/leading-us.toml new file mode 100644 index 0000000..fa94fd0 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/leading-us.toml @@ -0,0 +1 @@ +leading-us = _1.2 diff --git a/tests/data/invalid/burntsushi/invalid/float/leading-zero-neg.toml b/tests/data/invalid/burntsushi/invalid/float/leading-zero-neg.toml new file mode 100644 index 0000000..94a4e70 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/leading-zero-neg.toml @@ -0,0 +1 @@ +leading-zero-neg = -03.14 diff --git a/tests/data/invalid/burntsushi/invalid/float/leading-zero-plus.toml b/tests/data/invalid/burntsushi/invalid/float/leading-zero-plus.toml new file mode 100644 index 0000000..12bfd60 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/leading-zero-plus.toml @@ -0,0 +1 @@ +leading-zero-plus = +03.14 diff --git a/tests/data/invalid/burntsushi/invalid/float/leading-zero.toml b/tests/data/invalid/burntsushi/invalid/float/leading-zero.toml new file mode 100644 index 0000000..551fb25 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/leading-zero.toml @@ -0,0 +1 @@ +leading-zero = 03.14 diff --git a/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-1.toml b/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-1.toml new file mode 100644 index 0000000..df2e261 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-1.toml @@ -0,0 +1 @@ +nan-incomplete-1 = na diff --git a/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-2.toml b/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-2.toml new file mode 100644 index 0000000..6d2e8fb --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-2.toml @@ -0,0 +1 @@ +nan-incomplete-2 = +na diff --git a/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-3.toml b/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-3.toml new file mode 100644 index 0000000..9d365ac --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/nan-incomplete-3.toml @@ -0,0 +1 @@ +nan-incomplete-3 = -na diff --git a/tests/data/invalid/burntsushi/invalid/float/nan_underscore.toml b/tests/data/invalid/burntsushi/invalid/float/nan_underscore.toml new file mode 100644 index 0000000..44c8bf1 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/nan_underscore.toml @@ -0,0 +1 @@ +nan_underscore = na_n diff --git a/tests/data/invalid/burntsushi/invalid/float/trailing-point-min.toml b/tests/data/invalid/burntsushi/invalid/float/trailing-point-min.toml new file mode 100644 index 0000000..48741e3 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/trailing-point-min.toml @@ -0,0 +1 @@ +trailing-point-min = -1. diff --git a/tests/data/invalid/burntsushi/invalid/float/trailing-point-plus.toml b/tests/data/invalid/burntsushi/invalid/float/trailing-point-plus.toml new file mode 100644 index 0000000..9926039 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/trailing-point-plus.toml @@ -0,0 +1 @@ +trailing-point-plus = +1. diff --git a/tests/data/invalid/burntsushi/invalid/float/trailing-point.toml b/tests/data/invalid/burntsushi/invalid/float/trailing-point.toml new file mode 100644 index 0000000..76c95d9 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/trailing-point.toml @@ -0,0 +1 @@ +trailing-point = 1. diff --git a/tests/data/invalid/burntsushi/invalid/float/trailing-us-exp.toml b/tests/data/invalid/burntsushi/invalid/float/trailing-us-exp.toml new file mode 100644 index 0000000..7bba971 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/trailing-us-exp.toml @@ -0,0 +1,4 @@ +# trailing underscore in integer part is not allowed +trailing-us-exp = 1_e2 +# trailing underscore in float part is not allowed +trailing-us-exp2 = 1.2_e2 diff --git a/tests/data/invalid/burntsushi/invalid/float/trailing-us.toml b/tests/data/invalid/burntsushi/invalid/float/trailing-us.toml new file mode 100644 index 0000000..ddfb7ba --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/trailing-us.toml @@ -0,0 +1 @@ +trailing-us = 1.2_ diff --git a/tests/data/invalid/burntsushi/invalid/float/us-after-point.toml b/tests/data/invalid/burntsushi/invalid/float/us-after-point.toml new file mode 100644 index 0000000..7f15f57 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/us-after-point.toml @@ -0,0 +1 @@ +us-after-point = 1._2 diff --git a/tests/data/invalid/burntsushi/invalid/float/us-before-point.toml b/tests/data/invalid/burntsushi/invalid/float/us-before-point.toml new file mode 100644 index 0000000..c8edcbf --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/float/us-before-point.toml @@ -0,0 +1 @@ +us-before-point = 1_.2 diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/double-comma.toml b/tests/data/invalid/burntsushi/invalid/inline-table/double-comma.toml new file mode 100644 index 0000000..2d2913a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/double-comma.toml @@ -0,0 +1 @@ +t = {x=3,,y=4} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/duplicate-key.toml b/tests/data/invalid/burntsushi/invalid/inline-table/duplicate-key.toml new file mode 100644 index 0000000..0789e14 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/duplicate-key.toml @@ -0,0 +1,2 @@ +# Duplicate keys within an inline table are invalid +a={b=1, b=2} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/empty.toml b/tests/data/invalid/burntsushi/invalid/inline-table/empty.toml new file mode 100644 index 0000000..ebbb066 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/empty.toml @@ -0,0 +1 @@ +t = {,} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-1.toml b/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-1.toml new file mode 100644 index 0000000..0ae44b6 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-1.toml @@ -0,0 +1,4 @@ +# No newlines are allowed between the curly braces unless they are valid within +# a value. +simple = { a = 1 +} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-2.toml b/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-2.toml new file mode 100644 index 0000000..5ea4eaf --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-2.toml @@ -0,0 +1,2 @@ +t = {a=1, +b=2} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-3.toml b/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-3.toml new file mode 100644 index 0000000..7f6e892 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-3.toml @@ -0,0 +1,2 @@ +t = {a=1 +,b=2} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-4.toml b/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-4.toml new file mode 100644 index 0000000..3f34e15 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/linebreak-4.toml @@ -0,0 +1,4 @@ +json_like = { + first = "Tom", + last = "Preston-Werner" +} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/no-comma.toml b/tests/data/invalid/burntsushi/invalid/inline-table/no-comma.toml new file mode 100644 index 0000000..0a4083d --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/no-comma.toml @@ -0,0 +1 @@ +t = {x = 3 y = 4} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/overwrite.toml b/tests/data/invalid/burntsushi/invalid/inline-table/overwrite.toml new file mode 100644 index 0000000..4da0a85 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/overwrite.toml @@ -0,0 +1,3 @@ +a.b=0 +# Since table "a" is already defined, it can't be replaced by an inline table. +a={} diff --git a/tests/data/invalid/burntsushi/invalid/inline-table/trailing-comma.toml b/tests/data/invalid/burntsushi/invalid/inline-table/trailing-comma.toml new file mode 100644 index 0000000..6b67e02 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/inline-table/trailing-comma.toml @@ -0,0 +1,3 @@ +# A terminating comma (also called trailing comma) is not permitted after the +# last key/value pair in an inline table +abc = { abc = 123, } diff --git a/tests/data/invalid/burntsushi/invalid/integer/capital-bin.toml b/tests/data/invalid/burntsushi/invalid/integer/capital-bin.toml new file mode 100644 index 0000000..bea4e5e --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/capital-bin.toml @@ -0,0 +1 @@ +capital-bin = 0B0 diff --git a/tests/data/invalid/burntsushi/invalid/integer/capital-hex.toml b/tests/data/invalid/burntsushi/invalid/integer/capital-hex.toml new file mode 100644 index 0000000..bc064bb --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/capital-hex.toml @@ -0,0 +1 @@ +capital-hex = 0X1 diff --git a/tests/data/invalid/burntsushi/invalid/integer/capital-oct.toml b/tests/data/invalid/burntsushi/invalid/integer/capital-oct.toml new file mode 100644 index 0000000..ea08a4d --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/capital-oct.toml @@ -0,0 +1 @@ +capital-oct = 0O0 diff --git a/tests/data/invalid/burntsushi/invalid/integer/double-sign-nex.toml b/tests/data/invalid/burntsushi/invalid/integer/double-sign-nex.toml new file mode 100644 index 0000000..ff014cf --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/double-sign-nex.toml @@ -0,0 +1 @@ +double-sign-nex = --99 diff --git a/tests/data/invalid/burntsushi/invalid/integer/double-sign-plus.toml b/tests/data/invalid/burntsushi/invalid/integer/double-sign-plus.toml new file mode 100644 index 0000000..845ebb5 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/double-sign-plus.toml @@ -0,0 +1 @@ +double-sign-plus = ++99 diff --git a/tests/data/invalid/burntsushi/invalid/integer/double-us.toml b/tests/data/invalid/burntsushi/invalid/integer/double-us.toml new file mode 100644 index 0000000..cd00561 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/double-us.toml @@ -0,0 +1 @@ +double-us = 1__23 diff --git a/tests/data/invalid/burntsushi/invalid/integer/integer.multi b/tests/data/invalid/burntsushi/invalid/integer/integer.multi new file mode 100644 index 0000000..40ac409 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/integer.multi @@ -0,0 +1,41 @@ +leading-zero-1 = 01 +leading-zero-2 = 00 +leading-zero-3 = 0_0 +leading-zero-sign-1 = -01 +leading-zero-sign-2 = +01 +leading-zero-sign-3 = +0_1 + +double-sign-plus = ++99 +double-sign-nex = --99 + +negative-hex = -0xff +negative-bin = -0b11010110 +negative-oct = -0o99 + +positive-hex = +0xff +positive-bin = +0b11010110 +positive-oct = +0o99 + +trailing-us = 123_ +leading-us = _123 +double-us = 1__23 + +us-after-hex = 0x_1 +us-after-oct = 0o_1 +us-after-bin = 0b_1 + +trailing-us-hex = 0x1_ +trailing-us-oct = 0o1_ +trailing-us-bin = 0b1_ + +leading-us-hex = _0o1 +leading-us-oct = _0o1 +leading-us-bin = _0o1 + +invalid-hex = 0xaafz +invalid-oct = 0o778 +invalid-bin = 0b0012 + +capital-hex = 0X1 +capital-oct = 0O0 +capital-bin = 0B0 diff --git a/tests/data/invalid/burntsushi/invalid/integer/invalid-bin.toml b/tests/data/invalid/burntsushi/invalid/integer/invalid-bin.toml new file mode 100644 index 0000000..d018258 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/invalid-bin.toml @@ -0,0 +1 @@ +invalid-bin = 0b0012 diff --git a/tests/data/invalid/burntsushi/invalid/integer/invalid-hex.toml b/tests/data/invalid/burntsushi/invalid/integer/invalid-hex.toml new file mode 100644 index 0000000..7cc0e85 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/invalid-hex.toml @@ -0,0 +1 @@ +invalid-hex = 0xaafz diff --git a/tests/data/invalid/burntsushi/invalid/integer/invalid-oct.toml b/tests/data/invalid/burntsushi/invalid/integer/invalid-oct.toml new file mode 100644 index 0000000..03181b1 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/invalid-oct.toml @@ -0,0 +1 @@ +invalid-oct = 0o778 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-us-bin.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-us-bin.toml new file mode 100644 index 0000000..8885c03 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-us-bin.toml @@ -0,0 +1 @@ +leading-us-bin = _0o1 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-us-hex.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-us-hex.toml new file mode 100644 index 0000000..9f193f8 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-us-hex.toml @@ -0,0 +1 @@ +leading-us-hex = _0o1 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-us-oct.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-us-oct.toml new file mode 100644 index 0000000..a717f1c --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-us-oct.toml @@ -0,0 +1 @@ +leading-us-oct = _0o1 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-us.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-us.toml new file mode 100644 index 0000000..d059f50 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-us.toml @@ -0,0 +1 @@ +leading-us = _123 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-zero-1.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-1.toml new file mode 100644 index 0000000..eba6bda --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-1.toml @@ -0,0 +1 @@ +leading-zero-1 = 01 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-zero-2.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-2.toml new file mode 100644 index 0000000..436af56 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-2.toml @@ -0,0 +1 @@ +leading-zero-2 = 00 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-zero-3.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-3.toml new file mode 100644 index 0000000..5404fc8 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-3.toml @@ -0,0 +1 @@ +leading-zero-3 = 0_0 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-1.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-1.toml new file mode 100644 index 0000000..1f15a9d --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-1.toml @@ -0,0 +1 @@ +leading-zero-sign-1 = -01 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-2.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-2.toml new file mode 100644 index 0000000..fa259c3 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-2.toml @@ -0,0 +1 @@ +leading-zero-sign-2 = +01 diff --git a/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-3.toml b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-3.toml new file mode 100644 index 0000000..3ac64a5 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/leading-zero-sign-3.toml @@ -0,0 +1 @@ +leading-zero-sign-3 = +0_1 diff --git a/tests/data/invalid/burntsushi/invalid/integer/negative-bin.toml b/tests/data/invalid/burntsushi/invalid/integer/negative-bin.toml new file mode 100644 index 0000000..948b236 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/negative-bin.toml @@ -0,0 +1 @@ +negative-bin = -0b11010110 diff --git a/tests/data/invalid/burntsushi/invalid/integer/negative-hex.toml b/tests/data/invalid/burntsushi/invalid/integer/negative-hex.toml new file mode 100644 index 0000000..67c31ea --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/negative-hex.toml @@ -0,0 +1 @@ +negative-hex = -0xff diff --git a/tests/data/invalid/burntsushi/invalid/integer/negative-oct.toml b/tests/data/invalid/burntsushi/invalid/integer/negative-oct.toml new file mode 100644 index 0000000..b0c5ab0 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/negative-oct.toml @@ -0,0 +1 @@ +negative-oct = -0o99 diff --git a/tests/data/invalid/burntsushi/invalid/integer/positive-bin.toml b/tests/data/invalid/burntsushi/invalid/integer/positive-bin.toml new file mode 100644 index 0000000..7d6de65 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/positive-bin.toml @@ -0,0 +1 @@ +positive-bin = +0b11010110 diff --git a/tests/data/invalid/burntsushi/invalid/integer/positive-hex.toml b/tests/data/invalid/burntsushi/invalid/integer/positive-hex.toml new file mode 100644 index 0000000..bd503aa --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/positive-hex.toml @@ -0,0 +1 @@ +positive-hex = +0xff diff --git a/tests/data/invalid/burntsushi/invalid/integer/positive-oct.toml b/tests/data/invalid/burntsushi/invalid/integer/positive-oct.toml new file mode 100644 index 0000000..d77aa52 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/positive-oct.toml @@ -0,0 +1 @@ +positive-oct = +0o99 diff --git a/tests/data/invalid/burntsushi/invalid/integer/text-after-integer.toml b/tests/data/invalid/burntsushi/invalid/integer/text-after-integer.toml new file mode 100644 index 0000000..42de7af --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/text-after-integer.toml @@ -0,0 +1 @@ +answer = 42 the ultimate answer? diff --git a/tests/data/invalid/burntsushi/invalid/integer/trailing-us-bin.toml b/tests/data/invalid/burntsushi/invalid/integer/trailing-us-bin.toml new file mode 100644 index 0000000..9a0b574 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/trailing-us-bin.toml @@ -0,0 +1 @@ +trailing-us-bin = 0b1_ diff --git a/tests/data/invalid/burntsushi/invalid/integer/trailing-us-hex.toml b/tests/data/invalid/burntsushi/invalid/integer/trailing-us-hex.toml new file mode 100644 index 0000000..2a96455 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/trailing-us-hex.toml @@ -0,0 +1 @@ +trailing-us-hex = 0x1_ diff --git a/tests/data/invalid/burntsushi/invalid/integer/trailing-us-oct.toml b/tests/data/invalid/burntsushi/invalid/integer/trailing-us-oct.toml new file mode 100644 index 0000000..d28e8bc --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/trailing-us-oct.toml @@ -0,0 +1 @@ +trailing-us-oct = 0o1_ diff --git a/tests/data/invalid/burntsushi/invalid/integer/trailing-us.toml b/tests/data/invalid/burntsushi/invalid/integer/trailing-us.toml new file mode 100644 index 0000000..e11e8ff --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/trailing-us.toml @@ -0,0 +1 @@ +trailing-us = 123_ diff --git a/tests/data/invalid/burntsushi/invalid/integer/us-after-bin.toml b/tests/data/invalid/burntsushi/invalid/integer/us-after-bin.toml new file mode 100644 index 0000000..61dd895 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/us-after-bin.toml @@ -0,0 +1 @@ +us-after-bin = 0b_1 diff --git a/tests/data/invalid/burntsushi/invalid/integer/us-after-hex.toml b/tests/data/invalid/burntsushi/invalid/integer/us-after-hex.toml new file mode 100644 index 0000000..200220a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/us-after-hex.toml @@ -0,0 +1 @@ +us-after-hex = 0x_1 diff --git a/tests/data/invalid/burntsushi/invalid/integer/us-after-oct.toml b/tests/data/invalid/burntsushi/invalid/integer/us-after-oct.toml new file mode 100644 index 0000000..23f5300 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/integer/us-after-oct.toml @@ -0,0 +1 @@ +us-after-oct = 0o_1 diff --git a/tests/data/invalid/burntsushi/invalid/key/after-array.toml b/tests/data/invalid/burntsushi/invalid/key/after-array.toml new file mode 100644 index 0000000..5c1a1b0 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/after-array.toml @@ -0,0 +1 @@ +[[agencies]] owner = "S Cjelli" diff --git a/tests/data/invalid/burntsushi/invalid/key/after-table.toml b/tests/data/invalid/burntsushi/invalid/key/after-table.toml new file mode 100644 index 0000000..6886784 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/after-table.toml @@ -0,0 +1 @@ +[error] this = "should not be here" diff --git a/tests/data/invalid/burntsushi/invalid/key/after-value.toml b/tests/data/invalid/burntsushi/invalid/key/after-value.toml new file mode 100644 index 0000000..e05c47c --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/after-value.toml @@ -0,0 +1 @@ +first = "Tom" last = "Preston-Werner" # INVALID diff --git a/tests/data/invalid/burntsushi/invalid/key/bare-invalid-character.toml b/tests/data/invalid/burntsushi/invalid/key/bare-invalid-character.toml new file mode 100644 index 0000000..e50dbe3 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/bare-invalid-character.toml @@ -0,0 +1 @@ +bare!key = 123 diff --git a/tests/data/invalid/burntsushi/invalid/key/dotted-redefine-table.toml b/tests/data/invalid/burntsushi/invalid/key/dotted-redefine-table.toml new file mode 100644 index 0000000..55e25ac --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/dotted-redefine-table.toml @@ -0,0 +1,4 @@ +# Defined a.b as int +a.b = 1 +# Tries to access it as table: error +a.b.c = 2 diff --git a/tests/data/invalid/burntsushi/invalid/key/duplicate-keys.toml b/tests/data/invalid/burntsushi/invalid/key/duplicate-keys.toml new file mode 100644 index 0000000..9b5aee0 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/duplicate-keys.toml @@ -0,0 +1,2 @@ +dupe = false +dupe = true diff --git a/tests/data/invalid/burntsushi/invalid/key/duplicate.toml b/tests/data/invalid/burntsushi/invalid/key/duplicate.toml new file mode 100644 index 0000000..7847bd4 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/duplicate.toml @@ -0,0 +1,3 @@ +# DO NOT DO THIS +name = "Tom" +name = "Pradyun" diff --git a/tests/data/invalid/burntsushi/invalid/key/empty.toml b/tests/data/invalid/burntsushi/invalid/key/empty.toml new file mode 100644 index 0000000..09f998f --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/empty.toml @@ -0,0 +1 @@ + = 1 diff --git a/tests/data/invalid/burntsushi/invalid/key/escape.toml b/tests/data/invalid/burntsushi/invalid/key/escape.toml new file mode 100644 index 0000000..cdb8f4d --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/escape.toml @@ -0,0 +1 @@ +\u00c0 = "latin capital letter A with grave" diff --git a/tests/data/invalid/burntsushi/invalid/key/hash.toml b/tests/data/invalid/burntsushi/invalid/key/hash.toml new file mode 100644 index 0000000..e321b1f --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/hash.toml @@ -0,0 +1 @@ +a# = 1 diff --git a/tests/data/invalid/burntsushi/invalid/key/multiline.toml b/tests/data/invalid/burntsushi/invalid/key/multiline.toml new file mode 100644 index 0000000..31ff67e --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/multiline.toml @@ -0,0 +1,2 @@ +"""long +key""" = 1 diff --git a/tests/data/invalid/burntsushi/invalid/key/newline.toml b/tests/data/invalid/burntsushi/invalid/key/newline.toml new file mode 100644 index 0000000..24acaa1 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/newline.toml @@ -0,0 +1,2 @@ +barekey + = 123 diff --git a/tests/data/invalid/burntsushi/invalid/key/no-eol.toml b/tests/data/invalid/burntsushi/invalid/key/no-eol.toml new file mode 100644 index 0000000..3c58eee --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/no-eol.toml @@ -0,0 +1 @@ +a = 1 b = 2 diff --git a/tests/data/invalid/burntsushi/invalid/key/open-bracket.toml b/tests/data/invalid/burntsushi/invalid/key/open-bracket.toml new file mode 100644 index 0000000..f0aeb16 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/open-bracket.toml @@ -0,0 +1 @@ +[abc = 1 diff --git a/tests/data/invalid/burntsushi/invalid/key/partial-quoted.toml b/tests/data/invalid/burntsushi/invalid/key/partial-quoted.toml new file mode 100644 index 0000000..e491a2f --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/partial-quoted.toml @@ -0,0 +1 @@ +partial"quoted" = 5 diff --git a/tests/data/invalid/burntsushi/invalid/key/single-open-bracket.toml b/tests/data/invalid/burntsushi/invalid/key/single-open-bracket.toml new file mode 100644 index 0000000..558ed37 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/single-open-bracket.toml @@ -0,0 +1 @@ +[ diff --git a/tests/data/invalid/burntsushi/invalid/key/space.toml b/tests/data/invalid/burntsushi/invalid/key/space.toml new file mode 100644 index 0000000..7c22703 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/space.toml @@ -0,0 +1 @@ +a b = 1 diff --git a/tests/data/invalid/burntsushi/invalid/key/special-character.toml b/tests/data/invalid/burntsushi/invalid/key/special-character.toml new file mode 100644 index 0000000..bc181a5 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/special-character.toml @@ -0,0 +1 @@ +μ = "greek small letter mu" diff --git a/tests/data/invalid/burntsushi/invalid/key/start-bracket.toml b/tests/data/invalid/burntsushi/invalid/key/start-bracket.toml new file mode 100644 index 0000000..e0597ae --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/start-bracket.toml @@ -0,0 +1,3 @@ +[a] +[xyz = 5 +[b] diff --git a/tests/data/invalid/burntsushi/invalid/key/two-equals.toml b/tests/data/invalid/burntsushi/invalid/key/two-equals.toml new file mode 100644 index 0000000..25a0378 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/two-equals.toml @@ -0,0 +1 @@ +key= = 1 diff --git a/tests/data/invalid/burntsushi/invalid/key/two-equals2.toml b/tests/data/invalid/burntsushi/invalid/key/two-equals2.toml new file mode 100644 index 0000000..c5f2de8 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/two-equals2.toml @@ -0,0 +1 @@ +a==1 diff --git a/tests/data/invalid/burntsushi/invalid/key/two-equals3.toml b/tests/data/invalid/burntsushi/invalid/key/two-equals3.toml new file mode 100644 index 0000000..eb20372 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/two-equals3.toml @@ -0,0 +1 @@ +a=b=1 diff --git a/tests/data/invalid/burntsushi/invalid/key/without-value-1.toml b/tests/data/invalid/burntsushi/invalid/key/without-value-1.toml new file mode 100644 index 0000000..06bfde4 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/without-value-1.toml @@ -0,0 +1 @@ +key diff --git a/tests/data/invalid/burntsushi/invalid/key/without-value-2.toml b/tests/data/invalid/burntsushi/invalid/key/without-value-2.toml new file mode 100644 index 0000000..ca6d7eb --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/key/without-value-2.toml @@ -0,0 +1 @@ +key = diff --git a/tests/data/invalid/burntsushi/invalid/string/bad-byte-escape.toml b/tests/data/invalid/burntsushi/invalid/string/bad-byte-escape.toml new file mode 100644 index 0000000..4c7be59 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/bad-byte-escape.toml @@ -0,0 +1 @@ +naughty = "\xAg" diff --git a/tests/data/invalid/burntsushi/invalid/string/bad-codepoint.toml b/tests/data/invalid/burntsushi/invalid/string/bad-codepoint.toml new file mode 100644 index 0000000..592db75 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/bad-codepoint.toml @@ -0,0 +1 @@ +invalid-codepoint = "This string contains a non scalar unicode codepoint \uD801" diff --git a/tests/data/invalid/burntsushi/invalid/string/bad-concat.toml b/tests/data/invalid/burntsushi/invalid/string/bad-concat.toml new file mode 100644 index 0000000..fc6d3c9 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/bad-concat.toml @@ -0,0 +1 @@ +no_concat = "first" "second" diff --git a/tests/data/invalid/burntsushi/invalid/string/bad-escape-1.toml b/tests/data/invalid/burntsushi/invalid/string/bad-escape-1.toml new file mode 100644 index 0000000..60acb0c --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/bad-escape-1.toml @@ -0,0 +1 @@ +invalid-escape = "This string has a bad \a escape character." diff --git a/tests/data/invalid/burntsushi/invalid/string/bad-escape-2.toml b/tests/data/invalid/burntsushi/invalid/string/bad-escape-2.toml new file mode 100644 index 0000000..2a20d8c --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/bad-escape-2.toml @@ -0,0 +1,2 @@ +invalid-escape = "This string has a bad \ escape character." + diff --git a/tests/data/invalid/burntsushi/invalid/string/bad-multiline.toml b/tests/data/invalid/burntsushi/invalid/string/bad-multiline.toml new file mode 100644 index 0000000..786046b --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/bad-multiline.toml @@ -0,0 +1,2 @@ +multi = "first line +second line" diff --git a/tests/data/invalid/burntsushi/invalid/string/bad-slash-escape.toml b/tests/data/invalid/burntsushi/invalid/string/bad-slash-escape.toml new file mode 100644 index 0000000..154abad --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/bad-slash-escape.toml @@ -0,0 +1 @@ +invalid-escape = "This string has a bad \/ escape character." diff --git a/tests/data/invalid/burntsushi/invalid/string/bad-uni-esc.toml b/tests/data/invalid/burntsushi/invalid/string/bad-uni-esc.toml new file mode 100644 index 0000000..9eae4ab --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/bad-uni-esc.toml @@ -0,0 +1 @@ +str = "val\ue" diff --git a/tests/data/invalid/burntsushi/invalid/string/basic-byte-escapes.toml b/tests/data/invalid/burntsushi/invalid/string/basic-byte-escapes.toml new file mode 100644 index 0000000..e94452a --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/basic-byte-escapes.toml @@ -0,0 +1 @@ +answer = "\x33" diff --git a/tests/data/invalid/burntsushi/invalid/string/basic-multiline-out-of-range-unicode-escape-1.toml b/tests/data/invalid/burntsushi/invalid/string/basic-multiline-out-of-range-unicode-escape-1.toml new file mode 100644 index 0000000..b27e203 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/basic-multiline-out-of-range-unicode-escape-1.toml @@ -0,0 +1 @@ +a = """\UFFFFFFFF""" diff --git a/tests/data/invalid/burntsushi/invalid/string/basic-multiline-out-of-range-unicode-escape-2.toml b/tests/data/invalid/burntsushi/invalid/string/basic-multiline-out-of-range-unicode-escape-2.toml new file mode 100644 index 0000000..17a9361 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/basic-multiline-out-of-range-unicode-escape-2.toml @@ -0,0 +1 @@ +a = """\U00D80000""" diff --git a/tests/data/invalid/burntsushi/invalid/string/basic-multiline-quotes.toml b/tests/data/invalid/burntsushi/invalid/string/basic-multiline-quotes.toml new file mode 100644 index 0000000..02ebf13 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/basic-multiline-quotes.toml @@ -0,0 +1 @@ +str5 = """Here are three quotation marks: """.""" diff --git a/tests/data/invalid/burntsushi/invalid/string/basic-multiline-unknown-escape.toml b/tests/data/invalid/burntsushi/invalid/string/basic-multiline-unknown-escape.toml new file mode 100644 index 0000000..35c5cc5 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/basic-multiline-unknown-escape.toml @@ -0,0 +1 @@ +a = """\@""" diff --git a/tests/data/invalid/burntsushi/invalid/string/basic-out-of-range-unicode-escape-1.toml b/tests/data/invalid/burntsushi/invalid/string/basic-out-of-range-unicode-escape-1.toml new file mode 100644 index 0000000..ada1f55 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/basic-out-of-range-unicode-escape-1.toml @@ -0,0 +1 @@ +a = "\UFFFFFFFF" diff --git a/tests/data/invalid/burntsushi/invalid/string/basic-out-of-range-unicode-escape-2.toml b/tests/data/invalid/burntsushi/invalid/string/basic-out-of-range-unicode-escape-2.toml new file mode 100644 index 0000000..d4833b3 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/basic-out-of-range-unicode-escape-2.toml @@ -0,0 +1 @@ +a = "\U00D80000" diff --git a/tests/data/invalid/burntsushi/invalid/string/basic-unknown-escape.toml b/tests/data/invalid/burntsushi/invalid/string/basic-unknown-escape.toml new file mode 100644 index 0000000..381dd85 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/basic-unknown-escape.toml @@ -0,0 +1 @@ +a = "\@" diff --git a/tests/data/invalid/burntsushi/invalid/string/literal-multiline-quotes-1.toml b/tests/data/invalid/burntsushi/invalid/string/literal-multiline-quotes-1.toml new file mode 100644 index 0000000..9cfb763 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/literal-multiline-quotes-1.toml @@ -0,0 +1,2 @@ +a = '''6 apostrophes: '''''' + diff --git a/tests/data/invalid/burntsushi/invalid/string/literal-multiline-quotes-2.toml b/tests/data/invalid/burntsushi/invalid/string/literal-multiline-quotes-2.toml new file mode 100644 index 0000000..9924236 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/literal-multiline-quotes-2.toml @@ -0,0 +1 @@ +a = '''15 apostrophes: '''''''''''''''''' diff --git a/tests/data/invalid/burntsushi/invalid/string/missing-quotes.toml b/tests/data/invalid/burntsushi/invalid/string/missing-quotes.toml new file mode 100644 index 0000000..2292793 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/missing-quotes.toml @@ -0,0 +1 @@ +name = value diff --git a/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-1.toml b/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-1.toml new file mode 100644 index 0000000..5de9e15 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-1.toml @@ -0,0 +1,2 @@ +k = """t\a""" + diff --git a/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-2.toml b/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-2.toml new file mode 100644 index 0000000..3d1ac10 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-2.toml @@ -0,0 +1,2 @@ +# \<Space> is not a valid escape. +k = """t\ t""" diff --git a/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-3.toml b/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-3.toml new file mode 100644 index 0000000..95621eb --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/multiline-bad-escape-3.toml @@ -0,0 +1,3 @@ +# \<Space> is not a valid escape. +k = """t\ """ + diff --git a/tests/data/invalid/burntsushi/invalid/string/multiline-escape-space.toml b/tests/data/invalid/burntsushi/invalid/string/multiline-escape-space.toml new file mode 100644 index 0000000..13570d3 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/multiline-escape-space.toml @@ -0,0 +1,3 @@ +a = """ + foo \ \n + bar""" diff --git a/tests/data/invalid/burntsushi/invalid/string/multiline-no-close-2.toml b/tests/data/invalid/burntsushi/invalid/string/multiline-no-close-2.toml new file mode 100644 index 0000000..f469402 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/multiline-no-close-2.toml @@ -0,0 +1 @@ +x=""" diff --git a/tests/data/invalid/burntsushi/invalid/string/multiline-no-close.toml b/tests/data/invalid/burntsushi/invalid/string/multiline-no-close.toml new file mode 100644 index 0000000..4ca9597 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/multiline-no-close.toml @@ -0,0 +1,2 @@ +invalid = """ + this will fail diff --git a/tests/data/invalid/burntsushi/invalid/string/multiline-quotes-1.toml b/tests/data/invalid/burntsushi/invalid/string/multiline-quotes-1.toml new file mode 100644 index 0000000..9f7a42b --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/multiline-quotes-1.toml @@ -0,0 +1 @@ +a = """6 quotes: """""" diff --git a/tests/data/invalid/burntsushi/invalid/string/multiline-quotes-2.toml b/tests/data/invalid/burntsushi/invalid/string/multiline-quotes-2.toml new file mode 100644 index 0000000..9f7a42b --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/multiline-quotes-2.toml @@ -0,0 +1 @@ +a = """6 quotes: """""" diff --git a/tests/data/invalid/burntsushi/invalid/string/no-close.toml b/tests/data/invalid/burntsushi/invalid/string/no-close.toml new file mode 100644 index 0000000..0c292fc --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/no-close.toml @@ -0,0 +1 @@ +no-ending-quote = "One time, at band camp diff --git a/tests/data/invalid/burntsushi/invalid/string/text-after-string.toml b/tests/data/invalid/burntsushi/invalid/string/text-after-string.toml new file mode 100644 index 0000000..c92a6f1 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/text-after-string.toml @@ -0,0 +1 @@ +string = "Is there life after strings?" No. diff --git a/tests/data/invalid/burntsushi/invalid/string/wrong-close.toml b/tests/data/invalid/burntsushi/invalid/string/wrong-close.toml new file mode 100644 index 0000000..0f5c801 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/string/wrong-close.toml @@ -0,0 +1 @@ +bad-ending-quote = "double and single' diff --git a/tests/data/invalid/burntsushi/invalid/table/append-with-dotted-keys-1.toml b/tests/data/invalid/burntsushi/invalid/table/append-with-dotted-keys-1.toml new file mode 100644 index 0000000..0b5b4bb --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/append-with-dotted-keys-1.toml @@ -0,0 +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" diff --git a/tests/data/invalid/burntsushi/invalid/table/append-with-dotted-keys-2.toml b/tests/data/invalid/burntsushi/invalid/table/append-with-dotted-keys-2.toml new file mode 100644 index 0000000..3f0a011 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/append-with-dotted-keys-2.toml @@ -0,0 +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" diff --git a/tests/data/invalid/burntsushi/invalid/table/array-empty.toml b/tests/data/invalid/burntsushi/invalid/table/array-empty.toml new file mode 100644 index 0000000..a470ca3 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/array-empty.toml @@ -0,0 +1,2 @@ +[[]] +name = "Born to Run" diff --git a/tests/data/invalid/burntsushi/invalid/table/array-implicit.toml b/tests/data/invalid/burntsushi/invalid/table/array-implicit.toml new file mode 100644 index 0000000..05f2507 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/array-implicit.toml @@ -0,0 +1,14 @@ +# This test is a bit tricky. It should fail because the first use of +# `[[albums.songs]]` without first declaring `albums` implies that `albums` +# must be a table. The alternative would be quite weird. Namely, it wouldn't +# comply with the TOML spec: "Each double-bracketed sub-table will belong to +# the most *recently* defined table element *above* it." +# +# This is in contrast to the *valid* test, table-array-implicit where +# `[[albums.songs]]` works by itself, so long as `[[albums]]` isn't declared +# later. (Although, `[albums]` could be.) +[[albums.songs]] +name = "Glory Days" + +[[albums]] +name = "Born in the USA" diff --git a/tests/data/invalid/burntsushi/invalid/table/array-missing-bracket.toml b/tests/data/invalid/burntsushi/invalid/table/array-missing-bracket.toml new file mode 100644 index 0000000..39c73b0 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/array-missing-bracket.toml @@ -0,0 +1,2 @@ +[[albums] +name = "Born to Run" diff --git a/tests/data/invalid/burntsushi/invalid/table/duplicate-key-dotted-table.toml b/tests/data/invalid/burntsushi/invalid/table/duplicate-key-dotted-table.toml new file mode 100644 index 0000000..ade637b --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/duplicate-key-dotted-table.toml @@ -0,0 +1,4 @@ +[fruit] +apple.color = "red" + +[fruit.apple] # INVALID diff --git a/tests/data/invalid/burntsushi/invalid/table/duplicate-key-dotted-table2.toml b/tests/data/invalid/burntsushi/invalid/table/duplicate-key-dotted-table2.toml new file mode 100644 index 0000000..609b660 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/duplicate-key-dotted-table2.toml @@ -0,0 +1,4 @@ +[fruit] +apple.taste.sweet = true + +[fruit.apple.taste] # INVALID diff --git a/tests/data/invalid/burntsushi/invalid/table/duplicate-key-table.toml b/tests/data/invalid/burntsushi/invalid/table/duplicate-key-table.toml new file mode 100644 index 0000000..cedf05f --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/duplicate-key-table.toml @@ -0,0 +1,5 @@ +[fruit] +type = "apple" + +[fruit.type] +apple = "yes" diff --git a/tests/data/invalid/burntsushi/invalid/table/duplicate-table-array.toml b/tests/data/invalid/burntsushi/invalid/table/duplicate-table-array.toml new file mode 100644 index 0000000..a1d8705 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/duplicate-table-array.toml @@ -0,0 +1,2 @@ +[tbl] +[[tbl]] diff --git a/tests/data/invalid/burntsushi/invalid/table/duplicate-table-array2.toml b/tests/data/invalid/burntsushi/invalid/table/duplicate-table-array2.toml new file mode 100644 index 0000000..72eacbd --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/duplicate-table-array2.toml @@ -0,0 +1,2 @@ +[[tbl]] +[tbl] diff --git a/tests/data/invalid/burntsushi/invalid/table/duplicate.toml b/tests/data/invalid/burntsushi/invalid/table/duplicate.toml new file mode 100644 index 0000000..73ef1cc --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/duplicate.toml @@ -0,0 +1,5 @@ +[a] +b = 1 + +[a] +c = 2 diff --git a/tests/data/invalid/burntsushi/invalid/table/empty-implicit-table.toml b/tests/data/invalid/burntsushi/invalid/table/empty-implicit-table.toml new file mode 100644 index 0000000..0cc36d0 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/empty-implicit-table.toml @@ -0,0 +1 @@ +[naughty..naughty] diff --git a/tests/data/invalid/burntsushi/invalid/table/empty.toml b/tests/data/invalid/burntsushi/invalid/table/empty.toml new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/empty.toml @@ -0,0 +1 @@ +[] diff --git a/tests/data/invalid/burntsushi/invalid/table/equals-sign.toml b/tests/data/invalid/burntsushi/invalid/table/equals-sign.toml new file mode 100644 index 0000000..eb5e742 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/equals-sign.toml @@ -0,0 +1 @@ +[name=bad] diff --git a/tests/data/invalid/burntsushi/invalid/table/llbrace.toml b/tests/data/invalid/burntsushi/invalid/table/llbrace.toml new file mode 100644 index 0000000..047978e --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/llbrace.toml @@ -0,0 +1 @@ +[ [table]] diff --git a/tests/data/invalid/burntsushi/invalid/table/nested-brackets-close.toml b/tests/data/invalid/burntsushi/invalid/table/nested-brackets-close.toml new file mode 100644 index 0000000..c8b5a67 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/nested-brackets-close.toml @@ -0,0 +1,2 @@ +[a]b] +zyx = 42 diff --git a/tests/data/invalid/burntsushi/invalid/table/nested-brackets-open.toml b/tests/data/invalid/burntsushi/invalid/table/nested-brackets-open.toml new file mode 100644 index 0000000..246d7e9 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/nested-brackets-open.toml @@ -0,0 +1,2 @@ +[a[b] +zyx = 42 diff --git a/tests/data/invalid/burntsushi/invalid/table/quoted-no-close.toml b/tests/data/invalid/burntsushi/invalid/table/quoted-no-close.toml new file mode 100644 index 0000000..6e7c1a1 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/quoted-no-close.toml @@ -0,0 +1,2 @@ +["where will it end] +name = value diff --git a/tests/data/invalid/burntsushi/invalid/table/redefine.toml b/tests/data/invalid/burntsushi/invalid/table/redefine.toml new file mode 100644 index 0000000..fc23bf7 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/redefine.toml @@ -0,0 +1,6 @@ +# Define b as int, and try to use it as a table: error +[a] +b = 1 + +[a.b] +c = 2 diff --git a/tests/data/invalid/burntsushi/invalid/table/rrbrace.toml b/tests/data/invalid/burntsushi/invalid/table/rrbrace.toml new file mode 100644 index 0000000..3a4dee4 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/rrbrace.toml @@ -0,0 +1 @@ +[[table] ] diff --git a/tests/data/invalid/burntsushi/invalid/table/text-after-table.toml b/tests/data/invalid/burntsushi/invalid/table/text-after-table.toml new file mode 100644 index 0000000..87da9db --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/text-after-table.toml @@ -0,0 +1 @@ +[error] this shouldn't be here diff --git a/tests/data/invalid/burntsushi/invalid/table/whitespace.toml b/tests/data/invalid/burntsushi/invalid/table/whitespace.toml new file mode 100644 index 0000000..0a6a6a6 --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/whitespace.toml @@ -0,0 +1 @@ +[invalid key] diff --git a/tests/data/invalid/burntsushi/invalid/table/with-pound.toml b/tests/data/invalid/burntsushi/invalid/table/with-pound.toml new file mode 100644 index 0000000..e7b777e --- /dev/null +++ b/tests/data/invalid/burntsushi/invalid/table/with-pound.toml @@ -0,0 +1,2 @@ +[key#group] +answer = 42 |