toml_parser version 86291a3
FAIL valid/key/quoted-unicode
decode JSON output from parser:
invalid character 'x' in string escape code
input sent to parser-cmd:
"\u0000" = "null"
'\u0000' = "different key"
"\u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff" = "escaped key"
"~ ÿ 𐀀 " = "basic key"
'l ~ ÿ 𐀀 ' = "literal key"
output from parser-cmd (stdout):
{"\b \f A \u007f \u0080 ÿ \ud7ff \ue000 \uffff \x00 \uffff":{"type":"string","value":"escaped key"},"~ \u0080 ÿ \ud7ff \ue000 \uffff \U00010000 \U0010ffff":{"type":"string","value":"basic key"},"\\u0000":{"type":"string","value":"different key"},"\x00":{"type":"string","value":"null"},"l ~ \u0080 ÿ \ud7ff \ue000 \uffff \U00010000 \U0010ffff":{"type":"string","value":"literal key"}}
want:
{
"\u0000": {"type": "string", "value": "null"},
"\b \f A ÿ 𐀀 ": {"type": "string", "value": "escaped key"},
"\\u0000": {"type": "string", "value": "different key"},
"l ~ ÿ 𐀀 ": {"type": "string", "value": "literal key"},
"~ ÿ 𐀀 ": {"type": "string", "value": "basic key"}
}
FAIL valid/spec/float-0
Values for key "flt4" don't match:
Expected: 5e+22
Your encoder: 4.999999999999999e+22
input sent to parser-cmd:
# fractional
flt1 = +1.0
flt2 = 3.1415
flt3 = -0.01
# exponent
flt4 = 5e+22
flt5 = 1e06
flt6 = -2E-2
# both
flt7 = 6.626e-34
output from parser-cmd (stdout):
{
"flt1": {"type": "float", "value": "1"},
"flt2": {"type": "float", "value": "3.1415"},
"flt3": {"type": "float", "value": "-0.01"},
"flt4": {"type": "float", "value": "4.999999999999999e+22"},
"flt5": {"type": "float", "value": "1e+06"},
"flt6": {"type": "float", "value": "-0.02"},
"flt7": {"type": "float", "value": "6.618193064541891e-34"}
}
want:
{
"flt1": {"type": "float", "value": "1"},
"flt2": {"type": "float", "value": "3.1415"},
"flt3": {"type": "float", "value": "-0.01"},
"flt4": {"type": "float", "value": "5e+22"},
"flt5": {"type": "float", "value": "1e+06"},
"flt6": {"type": "float", "value": "-0.02"},
"flt7": {"type": "float", "value": "6.626e-34"}
}
FAIL valid/spec/string-3
Values for key "str2" don't match:
Expected: The quick brown fox jumps over the lazy dog.
Your encoder: The quick brown
fox jumps over the lazy dog.
input sent to parser-cmd:
# The following strings are byte-for-byte equivalent:
str1 = "The quick brown fox jumps over the lazy dog."
str2 = """
The quick brown \
fox jumps over \
the lazy dog."""
str3 = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
output from parser-cmd (stdout):
{
"str1": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"str2": {"type": "string", "value": "The quick brown \n\n fox jumps over the lazy dog."},
"str3": {
"type": "string",
"value": " The quick brown fox jumps over the lazy dog. "
}
}
want:
{
"str1": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"str2": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"str3": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."}
}
FAIL valid/string/ends-in-whitespace-escape
Values for key "beee" don't match:
Expected: heeee
geeee
Your encoder: heeee
geeee
input sent to parser-cmd:
beee = """
heeee
geeee\
"""
output from parser-cmd (stdout):
{
"beee": {"type": "string", "value": "heeee\ngeeee \n\n\n "}
}
want:
{
"beee": {"type": "string", "value": "heeee\ngeeee"}
}
FAIL valid/string/escapes
decode JSON output from parser:
invalid character 'x' in string escape code
input sent to parser-cmd:
backspace = "|\b."
tab = "|\t."
newline = "|\n."
formfeed = "|\f."
carriage = "|\r."
quote = "|\"."
backslash = "|\\."
delete = "|\u007F."
unitseparator = "|\u001F."
# \u is escaped, so should NOT be interperted as a \u escape.
notunicode1 = "|\\u."
notunicode2 = "|\u005Cu."
notunicode3 = "|\\u0075."
notunicode4 = "|\\\u0075."
output from parser-cmd (stdout):
{"notunicode2":{"type":"string","value":"|\\u."},"carriage":{"type":"string","value":"|\r."},"unitseparator":{"type":"string","value":"|\x1f."},"delete":{"type":"string","value":"|\u007f."},"quote":{"type":"string","value":"|\"."},"formfeed":{"type":"string","value":"|."},"tab":{"type":"string","value":"|\t."},"backspace":{"type":"string","value":"|\b."},"notunicode4":{"type":"string","value":"|\\u."},"notunicode3":{"type":"string","value":"|\\u0075."},"backslash":{"type":"string","value":"|\\."},"notunicode1":{"type":"string","value":"|\\u."},"newline":{"type":"string","value":"|\n."}}
want:
{
"backslash": {"type": "string", "value": "|\\."},
"backspace": {"type": "string", "value": "|\b."},
"carriage": {"type": "string", "value": "|\r."},
"delete": {"type": "string", "value": "|."},
"formfeed": {"type": "string", "value": "|\f."},
"newline": {"type": "string", "value": "|\n."},
"notunicode1": {"type": "string", "value": "|\\u."},
"notunicode2": {"type": "string", "value": "|\\u."},
"notunicode3": {"type": "string", "value": "|\\u0075."},
"notunicode4": {"type": "string", "value": "|\\u."},
"quote": {"type": "string", "value": "|\"."},
"tab": {"type": "string", "value": "|\t."},
"unitseparator": {"type": "string", "value": "|\u001f."}
}
FAIL valid/string/multiline
Values for key "equivalent_three" don't match:
Expected: The quick brown fox jumps over the lazy dog.
Your encoder: The quick brown fox jumps over the lazy dog.
input sent to parser-cmd:
# NOTE: this file includes some literal tab characters.
equivalent_one = "The quick brown fox jumps over the lazy dog."
equivalent_two = """
The quick brown \
fox jumps over \
the lazy dog."""
equivalent_three = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
whitespace-after-bs = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
no-space = """a\
b"""
# Has tab character.
keep-ws-before = """a \
b"""
escape-bs-1 = """a \\
b"""
escape-bs-2 = """a \\\
b"""
escape-bs-3 = """a \\\\
b"""
output from parser-cmd (stdout):
{
"equivalent_one": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"equivalent_two": {"type": "string", "value": "The quick brown \n\n fox jumps over the lazy dog."},
"escape-bs-1": {"type": "string", "value": "a \\\nb"},
"escape-bs-2": {"type": "string", "value": "a \\b"},
"escape-bs-3": {"type": "string", "value": "a \\\\\n b"},
"keep-ws-before": {"type": "string", "value": "a \t b"},
"no-space": {"type": "string", "value": "a b"},
"equivalent_three": {
"type": "string",
"value": " The quick brown fox jumps over the lazy dog. "
},
"whitespace-after-bs": {
"type": "string",
"value": " The quick brown fox jumps over \n the lazy dog.\n "
}
}
want:
{
"equivalent_one": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"equivalent_three": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"equivalent_two": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"escape-bs-1": {"type": "string", "value": "a \\\nb"},
"escape-bs-2": {"type": "string", "value": "a \\b"},
"escape-bs-3": {"type": "string", "value": "a \\\\\n b"},
"keep-ws-before": {"type": "string", "value": "a \tb"},
"no-space": {"type": "string", "value": "ab"},
"whitespace-after-bs": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."}
}
FAIL valid/string/multiline-empty
Values for key "empty-3" don't match:
Expected:
Your encoder:
input sent to parser-cmd:
empty-1 = """"""
# A newline immediately following the opening delimiter will be trimmed.
empty-2 = """
"""
# \ at the end of line trims newlines as well; note that last \ is followed by
# two spaces, which are ignored.
empty-3 = """\
"""
empty-4 = """\
\
\
"""
output from parser-cmd (stdout):
{
"empty-1": {"type": "string", "value": ""},
"empty-2": {"type": "string", "value": ""},
"empty-3": {"type": "string", "value": " "},
"empty-4": {"type": "string", "value": " \n "}
}
want:
{
"empty-1": {"type": "string", "value": ""},
"empty-2": {"type": "string", "value": ""},
"empty-3": {"type": "string", "value": ""},
"empty-4": {"type": "string", "value": ""}
}
FAIL valid/string/multiline-escaped-crlf
Values for key "0" don't match:
Expected:
Your encoder:
input sent to parser-cmd:
# The following line should be an unescaped backslash followed by a Windows
# newline sequence ("\r\n")
0="""\
"""
output from parser-cmd (stdout):
{
"0": {"type": "string", "value": "\n"}
}
want:
{
"0": {"type": "string", "value": ""}
}
FAIL valid/string/quoted-unicode
decode JSON output from parser:
invalid character 'x' in string escape code
input sent to parser-cmd:
escaped_string = "\u0000 \u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff"
not_escaped_string = '\u0000 \u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff'
basic_string = "~ ÿ 𐀀 "
literal_string = '~ ÿ 𐀀 '
output from parser-cmd (stdout):
{"basic_string":{"type":"string","value":"~ \u0080 ÿ \ud7ff \ue000 \uffff \ud800\udc00 \udbff\udfff"},"literal_string":{"type":"string","value":"~ \u0080 ÿ \ud7ff \ue000 \uffff \ud800\udc00 \udbff\udfff"},"escaped_string":{"type":"string","value":"\x00 \b \f A \u007f \u0080 ÿ \ud7ff \ue000 \uffff \x00 \uffff"},"not_escaped_string":{"type":"string","value":"\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff"}}
want:
{
"basic_string": {"type": "string", "value": "~ ÿ 𐀀 "},
"escaped_string": {"type": "string", "value": "\u0000 \b \f A ÿ 𐀀 "},
"literal_string": {"type": "string", "value": "~ ÿ 𐀀 "},
"not_escaped_string": {
"type": "string",
"value": "\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff"
}
}
FAIL valid/string/unicode-escape
decode JSON output from parser:
invalid character 'x' in string escape code
input sent to parser-cmd:
delta-1 = "\u03B4"
delta-2 = "\U000003B4"
a = "\u0061"
b = "\u0062"
c = "\U00000063"
null-1 = "\u0000"
null-2 = "\U00000000"
ml-delta-1 = """\u03B4"""
ml-delta-2 = """\U000003B4"""
ml-a = """\u0061"""
ml-b = """\u0062"""
ml-c = """\U00000063"""
ml-null-1 = """\u0000"""
ml-null-2 = """\U00000000"""
output from parser-cmd (stdout):
{"ml-null-1":{"type":"string","value":"\x00"},"c":{"type":"string","value":"c"},"ml-b":{"type":"string","value":"b"},"null-2":{"type":"string","value":"\x00"},"ml-c":{"type":"string","value":"c"},"ml-delta-1":{"type":"string","value":"\u03b4"},"delta-2":{"type":"string","value":"\u03b4"},"b":{"type":"string","value":"b"},"ml-a":{"type":"string","value":"a"},"ml-delta-2":{"type":"string","value":"\u03b4"},"ml-null-2":{"type":"string","value":"\x00"},"a":{"type":"string","value":"a"},"null-1":{"type":"string","value":"\x00"},"delta-1":{"type":"string","value":"\u03b4"}}
want:
{
"a": {"type": "string", "value": "a"},
"b": {"type": "string", "value": "b"},
"c": {"type": "string", "value": "c"},
"delta-1": {"type": "string", "value": "δ"},
"delta-2": {"type": "string", "value": "δ"},
"ml-a": {"type": "string", "value": "a"},
"ml-b": {"type": "string", "value": "b"},
"ml-c": {"type": "string", "value": "c"},
"ml-delta-1": {"type": "string", "value": "δ"},
"ml-delta-2": {"type": "string", "value": "δ"},
"ml-null-1": {"type": "string", "value": "\u0000"},
"ml-null-2": {"type": "string", "value": "\u0000"},
"null-1": {"type": "string", "value": "\u0000"},
"null-2": {"type": "string", "value": "\u0000"}
}
FAIL invalid/array/double-comma-1
Expected an error, but no error was reported.
input sent to parser-cmd:
double-comma-1 = [1,,2]
output from parser-cmd (stdout):
{
"double-comma-1": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
}
want:
Exit code 1
FAIL invalid/array/double-comma-2
Expected an error, but no error was reported.
input sent to parser-cmd:
double-comma-2 = [1,2,,]
output from parser-cmd (stdout):
{
"double-comma-2": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
}
want:
Exit code 1
FAIL invalid/array/extend-defined-aot
Expected an error, but no error was reported.
input sent to parser-cmd:
[[tab.arr]]
[tab]
arr.val1=1
output from parser-cmd (stdout):
{
"tab": {"arr": [{
"val1": {"type": "integer", "value": "1"}
}]}
}
want:
Exit code 1
FAIL invalid/array/extending-table
Expected an error, but no error was reported.
input sent to parser-cmd:
a = [{ b = 1 }]
# Cannot extend tables within static arrays
# https://github.com/toml-lang/toml/issues/908
[a.c]
foo = 1
output from parser-cmd (stdout):
{
"a": [{
"b": {"type": "integer", "value": "1"},
"c": {
"foo": {"type": "integer", "value": "1"}
}
}]
}
want:
Exit code 1
FAIL invalid/array/missing-separator-1
Expected an error, but no error was reported.
input sent to parser-cmd:
arrr = [true false]
output from parser-cmd (stdout):
{
"arrr": [
{"type": "bool", "value": "true"},
{"type": "bool", "value": "false"}
]
}
want:
Exit code 1
FAIL invalid/array/missing-separator-2
Expected an error, but no error was reported.
input sent to parser-cmd:
wrong = [ 1 2 3 ]
output from parser-cmd (stdout):
{
"wrong": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
]
}
want:
Exit code 1
FAIL invalid/array/no-comma-1
Expected an error, but no error was reported.
input sent to parser-cmd:
no-comma-1 = [true false]
output from parser-cmd (stdout):
{
"no-comma-1": [
{"type": "bool", "value": "true"},
{"type": "bool", "value": "false"}
]
}
want:
Exit code 1
FAIL invalid/array/no-comma-2
Expected an error, but no error was reported.
input sent to parser-cmd:
no-comma-2 = [ 1 2 3 ]
output from parser-cmd (stdout):
{
"no-comma-2": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
]
}
want:
Exit code 1
FAIL invalid/array/only-comma-1
Expected an error, but no error was reported.
input sent to parser-cmd:
only-comma-1 = [,]
output from parser-cmd (stdout):
{
"only-comma-1": []
}
want:
Exit code 1
FAIL invalid/array/only-comma-2
Expected an error, but no error was reported.
input sent to parser-cmd:
only-comma-2 = [,,]
output from parser-cmd (stdout):
{
"only-comma-2": []
}
want:
Exit code 1
FAIL invalid/array/tables-1
Expected an error, but no error was reported.
input sent to parser-cmd:
# INVALID TOML DOC
fruit = []
[[fruit]] # Not allowed
output from parser-cmd (stdout):
{
"fruit": [{}]
}
want:
Exit code 1
FAIL invalid/array/tables-2
Expected an error, but no error was reported.
input sent to parser-cmd:
# INVALID TOML DOC
[[fruit]]
name = "apple"
[[fruit.variety]]
name = "red delicious"
# This table conflicts with the previous table
[fruit.variety]
name = "granny smith"
output from parser-cmd (stdout):
{
"fruit": [{
"name": {"type": "string", "value": "apple"},
"variety": [
{
"name": {"type": "string", "value": "red delicious"}
},
{
"name": {"type": "string", "value": "granny smith"}
}
]
}]
}
want:
Exit code 1
FAIL invalid/bool/capitalized-false
Expected an error, but no error was reported.
input sent to parser-cmd:
capitalized-false = False
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/bool/capitalized-true
Expected an error, but no error was reported.
input sent to parser-cmd:
capitalized-true = True
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/bool/mixed-case
Expected an error, but no error was reported.
input sent to parser-cmd:
mixed-case = valid = False
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/bool/mixed-case-false
Expected an error, but no error was reported.
input sent to parser-cmd:
mixed-case-false = falsE
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/bool/mixed-case-true
Expected an error, but no error was reported.
input sent to parser-cmd:
mixed-case-true = trUe
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/bool/starting-same-false
Expected an error, but no error was reported.
input sent to parser-cmd:
starting-same-false = falsey
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/bool/starting-same-true
Expected an error, but no error was reported.
input sent to parser-cmd:
starting-same-true = truer
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/bool/wrong-case-false
Expected an error, but no error was reported.
input sent to parser-cmd:
wrong-case-false = FALSE
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/bool/wrong-case-true
Expected an error, but no error was reported.
input sent to parser-cmd:
wrong-case-true = TRUE
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/control/bare-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains a single carriage return control character
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/control/comment-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-cr = "Carriage return in comment" #
a=1
output from parser-cmd (stdout):
{
"a": {"type": "integer", "value": "1"},
"comment-cr": {"type": "string", "value": "Carriage return in comment"}
}
want:
Exit code 1
FAIL invalid/control/comment-del
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-del = "0x7f" #
output from parser-cmd (stdout):
{
"comment-del": {"type": "string", "value": "0x7f"}
}
want:
Exit code 1
FAIL invalid/control/comment-ff
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-ff = "0x7f" #
output from parser-cmd (stdout):
{
"comment-ff": {"type": "string", "value": "0x7f"}
}
want:
Exit code 1
FAIL invalid/control/comment-lf
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-lf = "ctrl-P" #
output from parser-cmd (stdout):
{
"comment-lf": {"type": "string", "value": "ctrl-P"}
}
want:
Exit code 1
FAIL invalid/control/comment-null
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-null = "null" #
output from parser-cmd (stdout):
{
"comment-null": {"type": "string", "value": "null"}
}
want:
Exit code 1
FAIL invalid/control/comment-us
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-us = "ctrl-_" #
output from parser-cmd (stdout):
{
"comment-us": {"type": "string", "value": "ctrl-_"}
}
want:
Exit code 1
FAIL invalid/control/multi-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
multi-cr = """null
"""
output from parser-cmd (stdout):
{
"multi-cr": {"type": "string", "value": "null\r"}
}
want:
Exit code 1
FAIL invalid/control/multi-del
Expected an error, but no error was reported.
input sent to parser-cmd:
multi-del = """null"""
output from parser-cmd (stdout):
{
"multi-del": {"type": "string", "value": "null"}
}
want:
Exit code 1
FAIL invalid/control/multi-lf
Expected an error, but no error was reported.
input sent to parser-cmd:
multi-lf = """null"""
output from parser-cmd (stdout):
{"multi-lf":{"type":"string","value":"null\x10"}}
want:
Exit code 1
FAIL invalid/control/multi-null
Expected an error, but no error was reported.
input sent to parser-cmd:
multi-null = """null """
output from parser-cmd (stdout):
{"multi-null":{"type":"string","value":"null\x00"}}
want:
Exit code 1
FAIL invalid/control/multi-us
Expected an error, but no error was reported.
input sent to parser-cmd:
multi-us = """null"""
output from parser-cmd (stdout):
{"multi-us":{"type":"string","value":"null\x1f"}}
want:
Exit code 1
FAIL invalid/control/rawmulti-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
rawmulti-cr = '''null
'''
output from parser-cmd (stdout):
{
"rawmulti-cr": {"type": "string", "value": "null\r"}
}
want:
Exit code 1
FAIL invalid/control/rawmulti-del
Expected an error, but no error was reported.
input sent to parser-cmd:
rawmulti-del = '''null'''
output from parser-cmd (stdout):
{
"rawmulti-del": {"type": "string", "value": "null"}
}
want:
Exit code 1
FAIL invalid/control/rawmulti-lf
Expected an error, but no error was reported.
input sent to parser-cmd:
rawmulti-lf = '''null'''
output from parser-cmd (stdout):
{"rawmulti-lf":{"type":"string","value":"null\x10"}}
want:
Exit code 1
FAIL invalid/control/rawmulti-null
Expected an error, but no error was reported.
input sent to parser-cmd:
rawmulti-null = '''null '''
output from parser-cmd (stdout):
{"rawmulti-null":{"type":"string","value":"null\x00"}}
want:
Exit code 1
FAIL invalid/control/rawmulti-us
Expected an error, but no error was reported.
input sent to parser-cmd:
rawmulti-us = '''null'''
output from parser-cmd (stdout):
{"rawmulti-us":{"type":"string","value":"null\x1f"}}
want:
Exit code 1
FAIL invalid/control/rawstring-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
rawstring-cr = 'null
'
output from parser-cmd (stdout):
{
"rawstring-cr": {"type": "string", "value": "null\r"}
}
want:
Exit code 1
FAIL invalid/control/rawstring-del
Expected an error, but no error was reported.
input sent to parser-cmd:
rawstring-del = 'null'
output from parser-cmd (stdout):
{
"rawstring-del": {"type": "string", "value": "null"}
}
want:
Exit code 1
FAIL invalid/control/rawstring-lf
Expected an error, but no error was reported.
input sent to parser-cmd:
rawstring-lf = 'null'
output from parser-cmd (stdout):
{"rawstring-lf":{"type":"string","value":"null\x10"}}
want:
Exit code 1
FAIL invalid/control/rawstring-null
Expected an error, but no error was reported.
input sent to parser-cmd:
rawstring-null = 'null '
output from parser-cmd (stdout):
{"rawstring-null":{"type":"string","value":"null\x00"}}
want:
Exit code 1
FAIL invalid/control/rawstring-us
Expected an error, but no error was reported.
input sent to parser-cmd:
rawstring-us = 'null'
output from parser-cmd (stdout):
{"rawstring-us":{"type":"string","value":"null\x1f"}}
want:
Exit code 1
FAIL invalid/control/string-bs
Expected an error, but no error was reported.
input sent to parser-cmd:
string-bs = "backspace"
output from parser-cmd (stdout):
{
"string-bs": {"type": "string", "value": "backspace\b"}
}
want:
Exit code 1
FAIL invalid/control/string-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
string-cr = "null
"
output from parser-cmd (stdout):
{
"string-cr": {"type": "string", "value": "null\r"}
}
want:
Exit code 1
FAIL invalid/control/string-del
Expected an error, but no error was reported.
input sent to parser-cmd:
string-del = "null"
output from parser-cmd (stdout):
{
"string-del": {"type": "string", "value": "null"}
}
want:
Exit code 1
FAIL invalid/control/string-lf
Expected an error, but no error was reported.
input sent to parser-cmd:
string-lf = "null"
output from parser-cmd (stdout):
{"string-lf":{"type":"string","value":"null\x10"}}
want:
Exit code 1
FAIL invalid/control/string-null
Expected an error, but no error was reported.
input sent to parser-cmd:
string-null = "null "
output from parser-cmd (stdout):
{"string-null":{"type":"string","value":"null\x00"}}
want:
Exit code 1
FAIL invalid/control/string-us
Expected an error, but no error was reported.
input sent to parser-cmd:
string-us = "null"
output from parser-cmd (stdout):
{"string-us":{"type":"string","value":"null\x1f"}}
want:
Exit code 1
FAIL invalid/datetime/mday-under
Expected an error, but no error was reported.
input sent to parser-cmd:
# date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-00T00:00:00-00:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "2006-01-00TZ"}
}
want:
Exit code 1
FAIL invalid/datetime/month-under
Expected an error, but no error was reported.
input sent to parser-cmd:
# date-month = 2DIGIT ; 01-12
d = 2007-00-01T00:00:00-00:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "2007-00-01TZ"}
}
want:
Exit code 1
FAIL invalid/datetime/no-leads-with-milli
Expected an error, but no error was reported.
input sent to parser-cmd:
# Day "5" instead of "05"; the leading zero is required.
with-milli = 1987-07-5T17:45:00.12Z
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/datetime/no-secs
Expected an error, but no error was reported.
input sent to parser-cmd:
# No seconds in time.
no-secs = 1987-07-05T17:45Z
output from parser-cmd (stdout):
{
"no-secs": {"type": "date-local", "value": "1987-07-05TZ"}
}
want:
Exit code 1
FAIL invalid/datetime/time-no-leads
Expected an error, but no error was reported.
input sent to parser-cmd:
# Leading 0 is always required.
d = 2023-10-01T1:32:00Z
output from parser-cmd (stdout):
{
"d": {"type": "date-local", "value": "2023-10-01TZ"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-codepoint
Expected an error, but no error was reported.
input sent to parser-cmd:
# Invalid codepoint U+D800 :
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-comment
Expected an error, but no error was reported.
input sent to parser-cmd:
#
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-multiline
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains an invalid UTF-8 sequence.
bad = """"""
output from parser-cmd (stdout):
{
"bad": {"type": "string", "value": "�"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-multiline-literal
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains an invalid UTF-8 sequence.
bad = ''''''
output from parser-cmd (stdout):
{"bad":{"type":"string","value":"\xc3"}}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-string
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains an invalid UTF-8 sequence.
bad = ""
output from parser-cmd (stdout):
{
"bad": {"type": "string", "value": "�"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-string-literal
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains an invalid UTF-8 sequence.
bad = ''
output from parser-cmd (stdout):
{"bad":{"type":"string","value":"\xc3"}}
want:
Exit code 1
FAIL invalid/float/double-point-1
Expected an error, but no error was reported.
input sent to parser-cmd:
double-point-1 = 0..1
output from parser-cmd (stdout):
{
"double-point-1": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/float/exp-double-e-1
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-double-e-1 = 1ee2
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/float/exp-double-e-2
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-double-e-2 = 1e2e3
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/float/exp-double-us
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-double-us = 1e__23
output from parser-cmd (stdout):
{
"exp-double-us": {"type": "float", "value": "9.999999999999999e+22"}
}
want:
Exit code 1
FAIL invalid/float/exp-leading-us
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-leading-us = 1e_23
output from parser-cmd (stdout):
{
"exp-leading-us": {"type": "float", "value": "9.999999999999999e+22"}
}
want:
Exit code 1
FAIL invalid/float/exp-point-1
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-point-1 = 1e2.3
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/float/exp-point-2
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-point-2 = 1.e2
output from parser-cmd (stdout):
{
"exp-point-2": {"type": "float", "value": "100"}
}
want:
Exit code 1
FAIL invalid/float/exp-point-3
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-point-3 = 3.e+20
output from parser-cmd (stdout):
{
"exp-point-3": {"type": "float", "value": "3e+20"}
}
want:
Exit code 1
FAIL invalid/float/exp-trailing-us
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-trailing-us = 1e23_
output from parser-cmd (stdout):
{
"exp-trailing-us": {"type": "float", "value": "9.999999999999999e+22"}
}
want:
Exit code 1
FAIL invalid/float/exp-trailing-us-1
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-trailing-us-1 = 1_e2
output from parser-cmd (stdout):
{
"exp-trailing-us-1": {"type": "float", "value": "100"}
}
want:
Exit code 1
FAIL invalid/float/exp-trailing-us-2
Expected an error, but no error was reported.
input sent to parser-cmd:
exp-trailing-us-2 = 1.2_e2
output from parser-cmd (stdout):
{
"exp-trailing-us-2": {"type": "float", "value": "120"}
}
want:
Exit code 1
FAIL invalid/float/inf-capital
Expected an error, but no error was reported.
input sent to parser-cmd:
v = Inf
output from parser-cmd (stdout):
{
"v": {"type": "float", "value": "+Inf"}
}
want:
Exit code 1
FAIL invalid/float/leading-point-neg
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-point-neg = -.12345
output from parser-cmd (stdout):
{
"leading-point-neg": {"type": "float", "value": "-0.12345"}
}
want:
Exit code 1
FAIL invalid/float/leading-point-plus
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-point-plus = +.12345
output from parser-cmd (stdout):
{
"leading-point-plus": {"type": "float", "value": "0.12345"}
}
want:
Exit code 1
FAIL invalid/float/leading-us
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-us = _1.2
output from parser-cmd (stdout):
{
"leading-us": {"type": "float", "value": "1.2"}
}
want:
Exit code 1
FAIL invalid/float/leading-zero
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero = 03.14
output from parser-cmd (stdout):
{
"leading-zero": {"type": "float", "value": "3.14"}
}
want:
Exit code 1
FAIL invalid/float/leading-zero-neg
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero-neg = -03.14
output from parser-cmd (stdout):
{
"leading-zero-neg": {"type": "float", "value": "-3.14"}
}
want:
Exit code 1
FAIL invalid/float/leading-zero-plus
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero-plus = +03.14
output from parser-cmd (stdout):
{
"leading-zero-plus": {"type": "float", "value": "3.14"}
}
want:
Exit code 1
FAIL invalid/float/nan-capital
Expected an error, but no error was reported.
input sent to parser-cmd:
v = NaN
output from parser-cmd (stdout):
{
"v": {"type": "float", "value": "NaN"}
}
want:
Exit code 1
FAIL invalid/float/trailing-point
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-point = 1.
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/float/trailing-point-min
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-point-min = -1.
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/float/trailing-point-plus
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-point-plus = +1.
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/float/trailing-us
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-us = 1.2_
output from parser-cmd (stdout):
{
"trailing-us": {"type": "float", "value": "1.2"}
}
want:
Exit code 1
FAIL invalid/float/trailing-us-exp-1
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-us-exp-1 = 1_e2
output from parser-cmd (stdout):
{
"trailing-us-exp-1": {"type": "float", "value": "100"}
}
want:
Exit code 1
FAIL invalid/float/trailing-us-exp-2
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-us-exp-2 = 1.2_e2
output from parser-cmd (stdout):
{
"trailing-us-exp-2": {"type": "float", "value": "120"}
}
want:
Exit code 1
FAIL invalid/float/us-after-point
Expected an error, but no error was reported.
input sent to parser-cmd:
us-after-point = 1._2
output from parser-cmd (stdout):
{
"us-after-point": {"type": "float", "value": "1.2"}
}
want:
Exit code 1
FAIL invalid/float/us-before-point
Expected an error, but no error was reported.
input sent to parser-cmd:
us-before-point = 1_.2
output from parser-cmd (stdout):
{
"us-before-point": {"type": "float", "value": "1.2"}
}
want:
Exit code 1
FAIL invalid/inline-table/double-comma
Expected an error, but no error was reported.
input sent to parser-cmd:
t = {x=3,,y=4}
output from parser-cmd (stdout):
{
"t": {
"x": {"type": "integer", "value": "3"},
"y": {"type": "integer", "value": "4"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/duplicate-key-1
Expected an error, but no error was reported.
input sent to parser-cmd:
# Duplicate keys within an inline table are invalid
a={b=1, b=2}
output from parser-cmd (stdout):
{
"a": {
"b": {"type": "integer", "value": "2"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/duplicate-key-2
Expected an error, but no error was reported.
input sent to parser-cmd:
table1 = { table2.dupe = 1, table2.dupe = 2 }
output from parser-cmd (stdout):
{
"table1": {
"table2": {
"dupe": {"type": "integer", "value": "2"}
}
}
}
want:
Exit code 1
FAIL invalid/inline-table/duplicate-key-3
Expected an error, but no error was reported.
input sent to parser-cmd:
tbl = { fruit = { apple.color = "red" }, fruit.apple.texture = { smooth = true } }
output from parser-cmd (stdout):
{
"tbl": {
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"texture": {
"smooth": {"type": "bool", "value": "true"}
}
}
}
}
}
want:
Exit code 1
FAIL invalid/inline-table/duplicate-key-4
Expected an error, but no error was reported.
input sent to parser-cmd:
tbl = { a.b = "a_b", a.b.c = "a_b_c" }
output from parser-cmd (stdout):
{
"tbl": {
"a": {
"b": {"type": "string", "value": "a_b"},
"c": {"type": "string", "value": "a_b_c"}
}
}
}
want:
Exit code 1
FAIL invalid/inline-table/empty-1
Expected an error, but no error was reported.
input sent to parser-cmd:
t = {,}
output from parser-cmd (stdout):
{
"t": {}
}
want:
Exit code 1
FAIL invalid/inline-table/empty-2
Expected an error, but no error was reported.
input sent to parser-cmd:
t = {,
}
output from parser-cmd (stdout):
{
"t": {}
}
want:
Exit code 1
FAIL invalid/inline-table/empty-3
Expected an error, but no error was reported.
input sent to parser-cmd:
t = {
,
}
output from parser-cmd (stdout):
{
"t": {}
}
want:
Exit code 1
FAIL invalid/inline-table/linebreak-1
Expected an error, but no error was reported.
input sent to parser-cmd:
# No newlines are allowed between the curly braces unless they are valid within
# a value.
simple = { a = 1
}
output from parser-cmd (stdout):
{
"simple": {
"a": {"type": "integer", "value": "1"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/linebreak-2
Expected an error, but no error was reported.
input sent to parser-cmd:
t = {a=1,
b=2}
output from parser-cmd (stdout):
{
"t": {
"a": {"type": "integer", "value": "1"},
"b": {"type": "integer", "value": "2"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/linebreak-3
Expected an error, but no error was reported.
input sent to parser-cmd:
t = {a=1
,b=2}
output from parser-cmd (stdout):
{
"t": {
"a": {"type": "integer", "value": "1"},
"b": {"type": "integer", "value": "2"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/linebreak-4
Expected an error, but no error was reported.
input sent to parser-cmd:
json_like = {
first = "Tom",
last = "Preston-Werner"
}
output from parser-cmd (stdout):
{
"json_like": {
"first": {"type": "string", "value": "Tom"},
"last": {"type": "string", "value": "Preston-Werner"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/no-comma-1
Expected an error, but no error was reported.
input sent to parser-cmd:
t = {x = 3 y = 4}
output from parser-cmd (stdout):
{
"t": {
"x": {"type": "integer", "value": "3"},
"y": {"type": "integer", "value": "4"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/no-comma-2
Expected an error, but no error was reported.
input sent to parser-cmd:
arrr = { comma-missing = true valid-toml = false }
output from parser-cmd (stdout):
{
"arrr": {
"comma-missing": {"type": "bool", "value": "true"},
"valid-toml": {"type": "bool", "value": "false"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-01
Expected an error, but no error was reported.
input sent to parser-cmd:
a.b=0
# Since table "a" is already defined, it can't be replaced by an inline table.
a={}
output from parser-cmd (stdout):
{
"a": {}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-02
Expected an error, but no error was reported.
input sent to parser-cmd:
a={}
# Inline tables are immutable and can't be extended
[a.b]
output from parser-cmd (stdout):
{
"a": {
"b": {}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-03
Expected an error, but no error was reported.
input sent to parser-cmd:
a = { b = 1 }
a.b = 2
output from parser-cmd (stdout):
{
"a": {
"b": {"type": "integer", "value": "2"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-05
Expected an error, but no error was reported.
input sent to parser-cmd:
inline-t = { nest = {} }
[inline-t.nest]
output from parser-cmd (stdout):
{
"inline-t": {
"nest": {}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-06
Expected an error, but no error was reported.
input sent to parser-cmd:
a = { b = 1, b.c = 2 }
output from parser-cmd (stdout):
{
"a": {
"b": {"type": "integer", "value": "1"},
"c": {"type": "integer", "value": "2"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-07
Expected an error, but no error was reported.
input sent to parser-cmd:
tab = { inner.table = [{}], inner.table.val = "bad" }
output from parser-cmd (stdout):
{
"tab": {
"inner": {"table": [{
"val": {"type": "string", "value": "bad"}
}]}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-08
Expected an error, but no error was reported.
input sent to parser-cmd:
tab = { inner = { dog = "best" }, inner.cat = "worst" }
output from parser-cmd (stdout):
{
"tab": {
"inner": {
"cat": {"type": "string", "value": "worst"},
"dog": {"type": "string", "value": "best"}
}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-09
Expected an error, but no error was reported.
input sent to parser-cmd:
[tab.nested]
inline-t = { nest = {} }
[tab]
nested.inline-t.nest = 2
output from parser-cmd (stdout):
{
"tab": {
"nested": {
"inline-t": {
"nest": {"type": "integer", "value": "2"}
}
}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-10
Expected an error, but no error was reported.
input sent to parser-cmd:
# Set implicit "b", overwrite "b" (illegal!) and then set another implicit.
#
# Caused panic: https://github.com/BurntSushi/toml/issues/403
a = {b.a = 1, b = 2, b.c = 3}
output from parser-cmd (stdout):
{
"a": {
"b": {"type": "integer", "value": "2"},
"c": {"type": "integer", "value": "3"}
}
}
want:
Exit code 1
FAIL invalid/inline-table/trailing-comma
Expected an error, but no error was reported.
input sent to parser-cmd:
# A terminating comma (also called trailing comma) is not permitted after the
# last key/value pair in an inline table
abc = { abc = 123, }
output from parser-cmd (stdout):
{
"abc": {
"abc": {"type": "integer", "value": "123"}
}
}
want:
Exit code 1
FAIL invalid/integer/double-us
Expected an error, but no error was reported.
input sent to parser-cmd:
double-us = 1__23
output from parser-cmd (stdout):
{
"double-us": {"type": "integer", "value": "123"}
}
want:
Exit code 1
FAIL invalid/integer/leading-us
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-us = _123
output from parser-cmd (stdout):
{
"leading-us": {"type": "integer", "value": "123"}
}
want:
Exit code 1
FAIL invalid/integer/leading-zero-1
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero-1 = 01
output from parser-cmd (stdout):
{
"leading-zero-1": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/integer/leading-zero-2
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero-2 = 00
output from parser-cmd (stdout):
{
"leading-zero-2": {"type": "integer", "value": "0"}
}
want:
Exit code 1
FAIL invalid/integer/leading-zero-3
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero-3 = 0_0
output from parser-cmd (stdout):
{
"leading-zero-3": {"type": "integer", "value": "0"}
}
want:
Exit code 1
FAIL invalid/integer/leading-zero-sign-1
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero-sign-1 = -01
output from parser-cmd (stdout):
{
"leading-zero-sign-1": {"type": "integer", "value": "-1"}
}
want:
Exit code 1
FAIL invalid/integer/leading-zero-sign-2
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero-sign-2 = +01
output from parser-cmd (stdout):
{
"leading-zero-sign-2": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/integer/leading-zero-sign-3
Expected an error, but no error was reported.
input sent to parser-cmd:
leading-zero-sign-3 = +0_1
output from parser-cmd (stdout):
{
"leading-zero-sign-3": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/integer/negative-bin
Expected an error, but no error was reported.
input sent to parser-cmd:
negative-bin = -0b11010110
output from parser-cmd (stdout):
{
"negative-bin": {"type": "integer", "value": "-214"}
}
want:
Exit code 1
FAIL invalid/integer/negative-hex
Expected an error, but no error was reported.
input sent to parser-cmd:
negative-hex = -0xff
output from parser-cmd (stdout):
{
"negative-hex": {"type": "integer", "value": "-255"}
}
want:
Exit code 1
FAIL invalid/integer/negative-oct
Expected an error, but no error was reported.
input sent to parser-cmd:
negative-oct = -0o755
output from parser-cmd (stdout):
{
"negative-oct": {"type": "integer", "value": "-493"}
}
want:
Exit code 1
FAIL invalid/integer/positive-bin
Expected an error, but no error was reported.
input sent to parser-cmd:
positive-bin = +0b11010110
output from parser-cmd (stdout):
{
"positive-bin": {"type": "integer", "value": "214"}
}
want:
Exit code 1
FAIL invalid/integer/positive-hex
Expected an error, but no error was reported.
input sent to parser-cmd:
positive-hex = +0xff
output from parser-cmd (stdout):
{
"positive-hex": {"type": "integer", "value": "255"}
}
want:
Exit code 1
FAIL invalid/integer/positive-oct
Expected an error, but no error was reported.
input sent to parser-cmd:
positive-oct = +0o755
output from parser-cmd (stdout):
{
"positive-oct": {"type": "integer", "value": "493"}
}
want:
Exit code 1
FAIL invalid/integer/text-after-integer
Expected an error, but no error was reported.
input sent to parser-cmd:
answer = 42 the ultimate answer?
output from parser-cmd (stdout):
{
"answer": {"type": "integer", "value": "42"}
}
want:
Exit code 1
FAIL invalid/integer/trailing-us
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-us = 123_
output from parser-cmd (stdout):
{
"trailing-us": {"type": "integer", "value": "123"}
}
want:
Exit code 1
FAIL invalid/integer/trailing-us-bin
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-us-bin = 0b1_
output from parser-cmd (stdout):
{
"trailing-us-bin": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/integer/trailing-us-hex
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-us-hex = 0x1_
output from parser-cmd (stdout):
{
"trailing-us-hex": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/integer/trailing-us-oct
Expected an error, but no error was reported.
input sent to parser-cmd:
trailing-us-oct = 0o1_
output from parser-cmd (stdout):
{
"trailing-us-oct": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/integer/us-after-bin
Expected an error, but no error was reported.
input sent to parser-cmd:
us-after-bin = 0b_1
output from parser-cmd (stdout):
{
"us-after-bin": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/integer/us-after-hex
Expected an error, but no error was reported.
input sent to parser-cmd:
us-after-hex = 0x_1
output from parser-cmd (stdout):
{
"us-after-hex": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/integer/us-after-oct
Expected an error, but no error was reported.
input sent to parser-cmd:
us-after-oct = 0o_1
output from parser-cmd (stdout):
{
"us-after-oct": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/after-array
Expected an error, but no error was reported.
input sent to parser-cmd:
[[agencies]] owner = "S Cjelli"
output from parser-cmd (stdout):
{
"agencies": [{
"owner": {"type": "string", "value": "S Cjelli"}
}]
}
want:
Exit code 1
FAIL invalid/key/after-table
Expected an error, but no error was reported.
input sent to parser-cmd:
[error] this = "should not be here"
output from parser-cmd (stdout):
{
"error": {
"this": {"type": "string", "value": "should not be here"}
}
}
want:
Exit code 1
FAIL invalid/key/after-value
Expected an error, but no error was reported.
input sent to parser-cmd:
first = "Tom" last = "Preston-Werner" # INVALID
output from parser-cmd (stdout):
{
"first": {"type": "string", "value": "Tom"},
"last": {"type": "string", "value": "Preston-Werner"}
}
want:
Exit code 1
FAIL invalid/key/dotted-redefine-table-1
Expected an error, but no error was reported.
input sent to parser-cmd:
a = false
a.b = true
output from parser-cmd (stdout):
{
"a": {"type": "bool", "value": "false"},
"b": {"type": "bool", "value": "true"}
}
want:
Exit code 1
FAIL invalid/key/dotted-redefine-table-2
Expected an error, but no error was reported.
input sent to parser-cmd:
# Defined a.b as int
a.b = 1
# Tries to access it as table: error
a.b.c = 2
output from parser-cmd (stdout):
{
"a": {
"b": {"type": "integer", "value": "1"},
"c": {"type": "integer", "value": "2"}
}
}
want:
Exit code 1
FAIL invalid/key/duplicate-keys-1
Expected an error, but no error was reported.
input sent to parser-cmd:
name = "Tom"
name = "Pradyun"
output from parser-cmd (stdout):
{
"name": {"type": "string", "value": "Pradyun"}
}
want:
Exit code 1
FAIL invalid/key/duplicate-keys-2
Expected an error, but no error was reported.
input sent to parser-cmd:
dupe = false
dupe = true
output from parser-cmd (stdout):
{
"dupe": {"type": "bool", "value": "true"}
}
want:
Exit code 1
FAIL invalid/key/duplicate-keys-3
Expected an error, but no error was reported.
input sent to parser-cmd:
spelling = "favorite"
"spelling" = "favourite"
output from parser-cmd (stdout):
{
"spelling": {"type": "string", "value": "favourite"}
}
want:
Exit code 1
FAIL invalid/key/duplicate-keys-4
Expected an error, but no error was reported.
input sent to parser-cmd:
spelling = "favorite"
'spelling' = "favourite"
output from parser-cmd (stdout):
{
"spelling": {"type": "string", "value": "favourite"}
}
want:
Exit code 1
FAIL invalid/key/newline-2
Expected an error, but no error was reported.
input sent to parser-cmd:
"quoted
key" = 1
output from parser-cmd (stdout):
{
"quoted\nkey": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/newline-3
Expected an error, but no error was reported.
input sent to parser-cmd:
'quoted
key' = 1
output from parser-cmd (stdout):
{
"quoted\nkey": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/newline-4
Expected an error, but no error was reported.
input sent to parser-cmd:
"""long
key""" = 1
output from parser-cmd (stdout):
{
"long\nkey": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/newline-5
Expected an error, but no error was reported.
input sent to parser-cmd:
'''long
key''' = 1
output from parser-cmd (stdout):
{
"long\nkey": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/no-eol
Expected an error, but no error was reported.
input sent to parser-cmd:
a = 1 b = 2
output from parser-cmd (stdout):
{
"a": {"type": "integer", "value": "1"},
"b": {"type": "integer", "value": "2"}
}
want:
Exit code 1
FAIL invalid/key/two-equals-3
Expected an error, but no error was reported.
input sent to parser-cmd:
a=b=1
output from parser-cmd (stdout):
{
"b": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/without-value-1
Expected an error, but no error was reported.
input sent to parser-cmd:
key
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/key/without-value-3
Expected an error, but no error was reported.
input sent to parser-cmd:
"key"
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/key/without-value-5
Expected an error, but no error was reported.
input sent to parser-cmd:
fs.fw
output from parser-cmd (stdout):
{
"fs": {}
}
want:
Exit code 1
FAIL invalid/key/without-value-7
Expected an error, but no error was reported.
input sent to parser-cmd:
fs.
output from parser-cmd (stdout):
{
"fs": {}
}
want:
Exit code 1
FAIL invalid/local-date/mday-under
Expected an error, but no error was reported.
input sent to parser-cmd:
# date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-00
output from parser-cmd (stdout):
{
"d": {"type": "date-local", "value": "2006-01-00TZ"}
}
want:
Exit code 1
FAIL invalid/local-date/month-under
Expected an error, but no error was reported.
input sent to parser-cmd:
# date-month = 2DIGIT ; 01-12
d = 2007-00-01
output from parser-cmd (stdout):
{
"d": {"type": "date-local", "value": "2007-00-01TZ"}
}
want:
Exit code 1
FAIL invalid/local-date/trailing-t
Expected an error, but no error was reported.
input sent to parser-cmd:
# Date cannot end with trailing T
d = 2006-01-30T
output from parser-cmd (stdout):
{
"d": {"type": "date-local", "value": "2006-01-30TZ"}
}
want:
Exit code 1
FAIL invalid/local-datetime/mday-under
Expected an error, but no error was reported.
input sent to parser-cmd:
# date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
# ; month/year
d = 2006-01-00T00:00:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime-local", "value": "2006-01-00T"}
}
want:
Exit code 1
FAIL invalid/local-datetime/month-under
Expected an error, but no error was reported.
input sent to parser-cmd:
# date-month = 2DIGIT ; 01-12
d = 2007-00-01T00:00:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime-local", "value": "2007-00-01T"}
}
want:
Exit code 1
FAIL invalid/local-datetime/no-leads-with-milli
Expected an error, but no error was reported.
input sent to parser-cmd:
# Day "5" instead of "05"; the leading zero is required.
with-milli = 1987-07-5T17:45:00.12
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/local-datetime/no-secs
Expected an error, but no error was reported.
input sent to parser-cmd:
# No seconds in time.
no-secs = 1987-07-05T17:45
output from parser-cmd (stdout):
{
"no-secs": {"type": "date-local", "value": "1987-07-05TZ"}
}
want:
Exit code 1
FAIL invalid/local-datetime/time-no-leads
Expected an error, but no error was reported.
input sent to parser-cmd:
# Leading 0 is always required.
d = 2023-10-01T1:32:00Z
output from parser-cmd (stdout):
{
"d": {"type": "date-local", "value": "2023-10-01TZ"}
}
want:
Exit code 1
FAIL invalid/spec/inline-table-2-0
Expected an error, but no error was reported.
input sent to parser-cmd:
[product]
type = { name = "Nail" }
type.edible = false # INVALID
output from parser-cmd (stdout):
{
"product": {
"type": {
"edible": {"type": "bool", "value": "false"},
"name": {"type": "string", "value": "Nail"}
}
}
}
want:
Exit code 1
FAIL invalid/spec/inline-table-3-0
Expected an error, but no error was reported.
input sent to parser-cmd:
[product]
type.name = "Nail"
type = { edible = false } # INVALID
output from parser-cmd (stdout):
{
"product": {
"type": {
"edible": {"type": "bool", "value": "false"}
}
}
}
want:
Exit code 1
FAIL invalid/spec/string-7-0
Expected an error, but no error was reported.
input sent to parser-cmd:
quot15 = '''Here are fifteen quotation marks: """""""""""""""'''
apos15 = '''Here are fifteen apostrophes: '''''''''''''''''' # INVALID
apos15 = "Here are fifteen apostrophes: '''''''''''''''"
# 'That,' she said, 'is still pointless.'
str = ''''That,' she said, 'is still pointless.''''
output from parser-cmd (stdout):
{
"apos15": {"type": "string", "value": "Here are fifteen apostrophes: '''''''''''''''"},
"quot15": {"type": "string", "value": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\""},
"str": {"type": "string", "value": "'That,' she said, 'is still pointless.'"}
}
want:
Exit code 1
FAIL invalid/spec/table-9-0
Expected an error, but no error was reported.
input sent to parser-cmd:
[fruit]
apple.color = "red"
apple.taste.sweet = true
[fruit.apple] # INVALID
# [fruit.apple.taste] # INVALID
[fruit.apple.texture] # you can add sub-tables
smooth = true
output from parser-cmd (stdout):
{
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"taste": {
"sweet": {"type": "bool", "value": "true"}
},
"texture": {
"smooth": {"type": "bool", "value": "true"}
}
}
}
}
want:
Exit code 1
FAIL invalid/spec/table-9-1
Expected an error, but no error was reported.
input sent to parser-cmd:
[fruit]
apple.color = "red"
apple.taste.sweet = true
# [fruit.apple] # INVALID
[fruit.apple.taste] # INVALID
[fruit.apple.texture] # you can add sub-tables
smooth = true
output from parser-cmd (stdout):
{
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"taste": {
"sweet": {"type": "bool", "value": "true"}
},
"texture": {
"smooth": {"type": "bool", "value": "true"}
}
}
}
}
want:
Exit code 1
FAIL invalid/string/bad-concat
Expected an error, but no error was reported.
input sent to parser-cmd:
no_concat = "first" "second"
output from parser-cmd (stdout):
{
"no_concat": {"type": "string", "value": "first"}
}
want:
Exit code 1
FAIL invalid/string/bad-escape-1
Expected an error, but no error was reported.
input sent to parser-cmd:
invalid-escape = "This string has a bad \a escape character."
output from parser-cmd (stdout):
{
"invalid-escape": {"type": "string", "value": "This string has a bad escape character."}
}
want:
Exit code 1
FAIL invalid/string/bad-escape-2
Expected an error, but no error was reported.
input sent to parser-cmd:
invalid-escape = "This string has a bad \ escape character."
output from parser-cmd (stdout):
{
"invalid-escape": {"type": "string", "value": "This string has a bad escape character."}
}
want:
Exit code 1
FAIL invalid/string/bad-escape-4
Expected an error, but no error was reported.
input sent to parser-cmd:
a = "a \\\ b"
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": "a \\b"}
}
want:
Exit code 1
FAIL invalid/string/bad-escape-5
Expected an error, but no error was reported.
input sent to parser-cmd:
a = "a \\\\\ b"
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": "a \\\\b"}
}
want:
Exit code 1
FAIL invalid/string/bad-multiline
Expected an error, but no error was reported.
input sent to parser-cmd:
multi = "first line
second line"
output from parser-cmd (stdout):
{
"multi": {"type": "string", "value": "first line\nsecond line"}
}
want:
Exit code 1
FAIL invalid/string/bad-slash-escape
Expected an error, but no error was reported.
input sent to parser-cmd:
invalid-escape = "This string has a bad \/ escape character."
output from parser-cmd (stdout):
{
"invalid-escape": {"type": "string", "value": "This string has a bad escape character."}
}
want:
Exit code 1
FAIL invalid/string/bad-uni-esc-6
Expected an error, but no error was reported.
input sent to parser-cmd:
bad-uni-esc-6 = "This string contains a non scalar unicode codepoint \uD801"
output from parser-cmd (stdout):
{
"bad-uni-esc-6": {"type": "string", "value": "This string contains a non scalar unicode codepoint �"}
}
want:
Exit code 1
FAIL invalid/string/basic-multiline-out-of-range-unicode-escape-1
Expected an error, but no error was reported.
input sent to parser-cmd:
a = """\UFFFFFFFF"""
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": ""}
}
want:
Exit code 1
FAIL invalid/string/basic-multiline-out-of-range-unicode-escape-2
Expected an error, but no error was reported.
input sent to parser-cmd:
a = """\U00D80000"""
output from parser-cmd (stdout):
{"a":{"type":"string","value":"\x00"}}
want:
Exit code 1
FAIL invalid/string/basic-multiline-unknown-escape
Expected an error, but no error was reported.
input sent to parser-cmd:
a = """\@"""
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": ""}
}
want:
Exit code 1
FAIL invalid/string/basic-out-of-range-unicode-escape-1
Expected an error, but no error was reported.
input sent to parser-cmd:
a = "\UFFFFFFFF"
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": ""}
}
want:
Exit code 1
FAIL invalid/string/basic-out-of-range-unicode-escape-2
Expected an error, but no error was reported.
input sent to parser-cmd:
a = "\U00D80000"
output from parser-cmd (stdout):
{"a":{"type":"string","value":"\x00"}}
want:
Exit code 1
FAIL invalid/string/basic-unknown-escape
Expected an error, but no error was reported.
input sent to parser-cmd:
a = "\@"
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": ""}
}
want:
Exit code 1
FAIL invalid/string/literal-multiline-quotes-1
Expected an error, but no error was reported.
input sent to parser-cmd:
a = '''6 apostrophes: ''''''
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": "6 apostrophes: '''"}
}
want:
Exit code 1
FAIL invalid/string/literal-multiline-quotes-2
Expected an error, but no error was reported.
input sent to parser-cmd:
a = '''15 apostrophes: ''''''''''''''''''
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": "15 apostrophes: '''''''''''''''"}
}
want:
Exit code 1
FAIL invalid/string/missing-quotes
Expected an error, but no error was reported.
input sent to parser-cmd:
name = value
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/string/multiline-bad-escape-1
Expected an error, but no error was reported.
input sent to parser-cmd:
k = """t\a"""
output from parser-cmd (stdout):
{
"k": {"type": "string", "value": "t"}
}
want:
Exit code 1
FAIL invalid/string/multiline-bad-escape-2
Expected an error, but no error was reported.
input sent to parser-cmd:
# \ is not a valid escape.
k = """t\ t"""
output from parser-cmd (stdout):
{
"k": {"type": "string", "value": "tt"}
}
want:
Exit code 1
FAIL invalid/string/multiline-bad-escape-3
Expected an error, but no error was reported.
input sent to parser-cmd:
# \ is not a valid escape.
k = """t\ """
output from parser-cmd (stdout):
{
"k": {"type": "string", "value": "t"}
}
want:
Exit code 1
FAIL invalid/string/multiline-escape-space-1
Expected an error, but no error was reported.
input sent to parser-cmd:
a = """
foo \ \n
bar"""
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": " foo \n\n bar"}
}
want:
Exit code 1
FAIL invalid/string/multiline-escape-space-2
Expected an error, but no error was reported.
input sent to parser-cmd:
bee = """
hee \
gee \ """
output from parser-cmd (stdout):
{
"bee": {"type": "string", "value": "hee \ngee "}
}
want:
Exit code 1
FAIL invalid/string/multiline-quotes-1
Expected an error, but no error was reported.
input sent to parser-cmd:
a = """6 quotes: """"""
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": "6 quotes: \"\"\""}
}
want:
Exit code 1
FAIL invalid/string/text-after-string
Expected an error, but no error was reported.
input sent to parser-cmd:
string = "Is there life after strings?" No.
output from parser-cmd (stdout):
{
"No": {},
"string": {"type": "string", "value": "Is there life after strings?"}
}
want:
Exit code 1
FAIL invalid/table/append-to-array-with-dotted-keys
Expected an error, but no error was reported.
input sent to parser-cmd:
[[a.b]]
[a]
b.y = 2
output from parser-cmd (stdout):
{
"a": {"b": [{
"y": {"type": "integer", "value": "2"}
}]}
}
want:
Exit code 1
FAIL invalid/table/append-with-dotted-keys-1
Expected an error, but no error was reported.
input sent to parser-cmd:
# 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"
output from parser-cmd (stdout):
{
"a": {
"b": {
"c": {
"z": {"type": "integer", "value": "9"},
"t": {
"type": "string",
"value": "Using dotted keys to add to [a.b.c] after explicitly defining it above is not allowed"
}
}
}
}
}
want:
Exit code 1
FAIL invalid/table/append-with-dotted-keys-2
Expected an error, but no error was reported.
input sent to parser-cmd:
# 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"
output from parser-cmd (stdout):
{
"a": {
"b": {
"c": {
"d": {
"z": {"type": "integer", "value": "9"},
"k": {
"t": {
"type": "string",
"value": "Using dotted keys to add to [a.b.c.d] after explicitly defining it above is not allowed"
}
}
}
}
}
}
}
want:
Exit code 1
FAIL invalid/table/array-empty
Expected an error, but no error was reported.
input sent to parser-cmd:
[[]]
name = "Born to Run"
output from parser-cmd (stdout):
{
"]": [{
"name": {"type": "string", "value": "Born to Run"}
}]
}
want:
Exit code 1
FAIL invalid/table/array-no-close-1
Expected an error, but no error was reported.
input sent to parser-cmd:
[[albums]
name = "Born to Run"
output from parser-cmd (stdout):
{
"albums": [{
"name": {"type": "string", "value": "Born to Run"}
}]
}
want:
Exit code 1
FAIL invalid/table/array-no-close-2
Expected an error, but no error was reported.
input sent to parser-cmd:
[[closing-bracket.missing]
blaa=2
output from parser-cmd (stdout):
{
"closing-bracket": {"missing": [{
"blaa": {"type": "integer", "value": "2"}
}]}
}
want:
Exit code 1
FAIL invalid/table/duplicate
Expected an error, but no error was reported.
input sent to parser-cmd:
[a]
b = 1
[a]
c = 2
output from parser-cmd (stdout):
{
"a": {
"b": {"type": "integer", "value": "1"},
"c": {"type": "integer", "value": "2"}
}
}
want:
Exit code 1
FAIL invalid/table/duplicate-key-dotted-table
Expected an error, but no error was reported.
input sent to parser-cmd:
[fruit]
apple.color = "red"
[fruit.apple] # INVALID
output from parser-cmd (stdout):
{
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"}
}
}
}
want:
Exit code 1
FAIL invalid/table/duplicate-key-dotted-table2
Expected an error, but no error was reported.
input sent to parser-cmd:
[fruit]
apple.taste.sweet = true
[fruit.apple.taste] # INVALID
output from parser-cmd (stdout):
{
"fruit": {
"apple": {
"taste": {
"sweet": {"type": "bool", "value": "true"}
}
}
}
}
want:
Exit code 1
FAIL invalid/table/duplicate-table-array2
Expected an error, but no error was reported.
input sent to parser-cmd:
[[tbl]]
[tbl]
output from parser-cmd (stdout):
{
"tbl": [
{},
{}
]
}
want:
Exit code 1
FAIL invalid/table/empty
Expected an error, but no error was reported.
input sent to parser-cmd:
[]
output from parser-cmd (stdout):
{
"]": {}
}
want:
Exit code 1
FAIL invalid/table/llbrace
Expected an error, but no error was reported.
input sent to parser-cmd:
[ [table]]
output from parser-cmd (stdout):
{
"table": [{}]
}
want:
Exit code 1
FAIL invalid/table/overwrite-array-in-parent
Expected an error, but no error was reported.
input sent to parser-cmd:
[[parent-table.arr]]
[parent-table]
not-arr = 1
arr = 2
output from parser-cmd (stdout):
{
"parent-table": {
"arr": {"type": "integer", "value": "2"},
"not-arr": {"type": "integer", "value": "1"}
}
}
want:
Exit code 1
FAIL invalid/table/overwrite-with-deep-table
Expected an error, but no error was reported.
input sent to parser-cmd:
a=1
[a.b.c.d]
output from parser-cmd (stdout):
{
"a": {"type": "integer", "value": "1"},
"b": {
"c": {}
}
}
want:
Exit code 1
FAIL invalid/table/redefine-2
Expected an error, but no error was reported.
input sent to parser-cmd:
[t1]
t2.t3.v = 0
[t1.t2]
output from parser-cmd (stdout):
{
"t1": {
"t2": {
"t3": {
"v": {"type": "integer", "value": "0"}
}
}
}
}
want:
Exit code 1
FAIL invalid/table/redefine-3
Expected an error, but no error was reported.
input sent to parser-cmd:
[t1]
t2.t3.v = 0
[t1.t2.t3]
output from parser-cmd (stdout):
{
"t1": {
"t2": {
"t3": {
"v": {"type": "integer", "value": "0"}
}
}
}
}
want:
Exit code 1
FAIL invalid/table/rrbrace
Expected an error, but no error was reported.
input sent to parser-cmd:
[[table] ]
output from parser-cmd (stdout):
{
"table": [{}]
}
want:
Exit code 1
FAIL invalid/table/super-twice
Expected an error, but no error was reported.
input sent to parser-cmd:
[a.b]
[a]
[a]
output from parser-cmd (stdout):
{
"a": {
"b": {}
}
}
want:
Exit code 1
toml-test v2025-04-19 [./toml_parser]: using embedded tests
valid tests: 184 passed, 10 failed
invalid tests: 170 passed, 207 failed
==> ENCODER TESTS
(not supported)
took 0.0 0.0