toml version 65bab75
FAIL valid/array/mixed-string-table
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 880, in load_value
return (self.load_array(v), "array")
~~~~~~~~~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 1001, in load_array
a[b] = a[b] + ',' + a[b + 1]
~^^^^^^^
IndexError: list index out of range
Exit 1
input sent to parser-cmd (PID 5152):
contributors = [
"Foo Bar ",
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
]
# Start with a table as the first element. This tests a case that some libraries
# might have where they will check if the first entry is a table/map/hash/assoc
# array and then encode it as a table array. This was a reasonable thing to do
# before TOML 1.0 since arrays could only contain one type, but now it's no
# longer.
mixed = [{k="a"}, "b", 1]
output from parser-cmd (PID 5152) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 880, in load_value
return (self.load_array(v), "array")
~~~~~~~~~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 1001, in load_array
a[b] = a[b] + ',' + a[b + 1]
~^^^^^^^
IndexError: list index out of range
Exit 1
want:
FAIL valid/array/string-with-comma-2
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 767, in load_line
k, koffset = self._load_line_multiline_str(pair[1])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 797, in _load_line_multiline_str
while len(newp) > 1 and newp[-1][0] != '"' and newp[-1][0] != "'":
~~~~~~~~^^^
IndexError: string index out of range
Exit 1
input sent to parser-cmd (PID 5162):
title = [
"""Client: XXXX,
Job: XXXX""",
"Code: XXXX"
]
output from parser-cmd (PID 5162) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 767, in load_line
k, koffset = self._load_line_multiline_str(pair[1])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 797, in _load_line_multiline_str
while len(newp) > 1 and newp[-1][0] != '"' and newp[-1][0] != "'":
~~~~~~~~^^^
IndexError: string index out of range
Exit 1
want:
FAIL valid/comment/tricky
Could not find key "hash#tag" in parser output.
input sent to parser-cmd (PID 5174):
[section]#attached comment
#[notsection]
one = "11"#cmt
two = "22#"
three = '#'
four = """# no comment
# nor this
#also not comment"""#is_comment
five = 5.5#66
six = 6#7
8 = "eight"
#nine = 99
ten = 10e2#1
eleven = 1.11e1#23
["hash#tag"]
"#!" = "hash bang"
arr3 = [ "#", '#', """###""" ]
arr4 = [ 1,# 9, 9,
2#,9
,#9
3#]
,4]
arr5 = [[[[#["#"],
["#"]]]]#]
]
tbl1 = { "#" = '}#'}#}}
output from parser-cmd (PID 5174) (stdout):
{
"section": {
"one": {"type": "string", "value": "11"},
"three": {"type": "string", "value": "#"},
"two": {"type": "string", "value": "22#"}
}
}
want:
{
"hash#tag": {
"#!": {"type": "string", "value": "hash bang"},
"arr5": [[[[[{"type": "string", "value": "#"}]]]]],
"arr3": [
{"type": "string", "value": "#"},
{"type": "string", "value": "#"},
{"type": "string", "value": "###"}
],
"arr4": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"},
{"type": "integer", "value": "4"}
],
"tbl1": {
"#": {"type": "string", "value": "}#"}
}
},
"section": {
"8": {"type": "string", "value": "eight"},
"eleven": {"type": "float", "value": "11.1"},
"five": {"type": "float", "value": "5.5"},
"four": {"type": "string", "value": "# no comment\n# nor this\n#also not comment"},
"one": {"type": "string", "value": "11"},
"six": {"type": "integer", "value": "6"},
"ten": {"type": "float", "value": "1000.0"},
"three": {"type": "string", "value": "#"},
"two": {"type": "string", "value": "22#"}
}
}
FAIL valid/datetime/local-time
Values for key "milliseconds" don't match:
Expected: 0000-01-01 10:32:00.555 +0000 UTC
Your encoder: 0000-01-01 10:32:00.000555 +0000 UTC
input sent to parser-cmd (PID 5181):
besttimeever = 17:45:00
milliseconds = 10:32:00.555
output from parser-cmd (PID 5181) (stdout):
{
"besttimeever": {"type": "time-local", "value": "17:45:00.000000"},
"milliseconds": {"type": "time-local", "value": "10:32:00.000555"}
}
want:
{
"besttimeever": {"type": "time-local", "value": "17:45:00"},
"milliseconds": {"type": "time-local", "value": "10:32:00.555"}
}
FAIL valid/float/zero
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 894, in load_value
raise ValueError("Weirdness with leading zeroes or "
"underscores in your number.")
ValueError: Weirdness with leading zeroes or underscores in your number.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Weirdness with leading zeroes or underscores in your number. (line 4 column 1 char 47)
Exit 1
input sent to parser-cmd (PID 5198):
zero = 0.0
signed-pos = +0.0
signed-neg = -0.0
exponent = 0e0
exponent-two-0 = 0e00
exponent-signed-pos = +0e0
exponent-signed-neg = -0e0
output from parser-cmd (PID 5198) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 894, in load_value
raise ValueError("Weirdness with leading zeroes or "
"underscores in your number.")
ValueError: Weirdness with leading zeroes or underscores in your number.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Weirdness with leading zeroes or underscores in your number. (line 4 column 1 char 47)
Exit 1
want:
FAIL valid/inline-table/key-dotted-1
Could not find key "c.a" in parser output.
input sent to parser-cmd (PID 5208):
a = { a.b = 1 }
b = { "a"."b" = 1 }
c = { a . b = 1 }
d = { 'a' . "b" = 1 }
e = {a.b=1}
output from parser-cmd (PID 5208) (stdout):
{
"a": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"b": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"c": {
"a ": {
"b": {"type": "integer", "value": "1"}
}
},
"d": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"e": {
"a": {
"b": {"type": "integer", "value": "1"}
}
}
}
want:
{
"a": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"b": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"c": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"d": {
"a": {
"b": {"type": "integer", "value": "1"}
}
},
"e": {
"a": {
"b": {"type": "integer", "value": "1"}
}
}
}
FAIL valid/inline-table/key-dotted-5
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 880, in load_value
return (self.load_array(v), "array")
~~~~~~~~~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 1001, in load_array
a[b] = a[b] + ',' + a[b + 1]
~^^^^^^^
IndexError: list index out of range
Exit 1
input sent to parser-cmd (PID 5212):
arr-1 = [{a.b = 1}]
arr-2 = ["str", {a.b = 1}]
arr-3 = [{a.b = 1}, {a.b = 2}]
arr-4 = ["str", {a.b = 1}, {a.b = 2}]
output from parser-cmd (PID 5212) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 880, in load_value
return (self.load_array(v), "array")
~~~~~~~~~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 1001, in load_array
a[b] = a[b] + ',' + a[b + 1]
~^^^^^^^
IndexError: list index out of range
Exit 1
want:
FAIL valid/inline-table/multiline
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 883, in load_value
self.load_inline_object(v, inline_object)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 677, in load_inline_object
raise ValueError("Invalid inline table value encountered")
ValueError: Invalid inline table value encountered
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Invalid inline table value encountered (line 1 column 1 char 0)
Exit 1
input sent to parser-cmd (PID 5216):
tbl_multiline = { a = 1, b = """
multiline
""", c = """and yet
another line""", d = 4 }
output from parser-cmd (PID 5216) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 883, in load_value
self.load_inline_object(v, inline_object)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 677, in load_inline_object
raise ValueError("Invalid inline table value encountered")
ValueError: Invalid inline table value encountered
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Invalid inline table value encountered (line 1 column 1 char 0)
Exit 1
want:
FAIL valid/key/dotted-1
Could not find key "name.last" in parser output.
input sent to parser-cmd (PID 5226):
name.first = "Arthur"
"name".'last' = "Dent"
many.dots.dot.dot.dot = 42
output from parser-cmd (PID 5226) (stdout):
{
"many": {
"dots": {
"dot": {
"dot": {
"dot": {"type": "integer", "value": "42"}
}
}
}
},
"name": {
"'last'": {"type": "string", "value": "Dent"},
"first": {"type": "string", "value": "Arthur"}
}
}
want:
{
"many": {
"dots": {
"dot": {
"dot": {
"dot": {"type": "integer", "value": "42"}
}
}
}
},
"name": {
"first": {"type": "string", "value": "Arthur"},
"last": {"type": "string", "value": "Dent"}
}
}
FAIL valid/key/dotted-2
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 260, in loads
raise TomlDecodeError("Found invalid character in key name: '" +
item + "'. Try quoting the key name.",
original, i)
toml.decoder.TomlDecodeError: Found invalid character in key name: '"'. Try quoting the key name. (line 7 column 11 char 166)
Exit 1
input sent to parser-cmd (PID 5228):
# Note: this file contains literal tab characters.
# Space are ignored, and key parts can be quoted.
count.a = 1
count . b = 2
"count"."c" = 3
"count" . "d" = 4
'count'.'e' = 5
'count' . 'f' = 6
"count".'g' = 7
"count" . 'h' = 8
count.'i' = 9
count . 'j' = 10
"count".k = 11
"count" . l = 12
output from parser-cmd (PID 5228) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 260, in loads
raise TomlDecodeError("Found invalid character in key name: '" +
item + "'. Try quoting the key name.",
original, i)
toml.decoder.TomlDecodeError: Found invalid character in key name: '"'. Try quoting the key name. (line 7 column 11 char 166)
Exit 1
want:
FAIL valid/key/dotted-empty
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 781, in load_line
raise ValueError("Duplicate keys!")
ValueError: Duplicate keys!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Duplicate keys! (line 2 column 1 char 17)
Exit 1
input sent to parser-cmd (PID 5231):
''.x = "empty.x"
x."" = "x.empty"
[a]
"".'' = "empty.empty"
output from parser-cmd (PID 5231) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 781, in load_line
raise ValueError("Duplicate keys!")
ValueError: Duplicate keys!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Duplicate keys! (line 2 column 1 char 17)
Exit 1
want:
FAIL valid/key/escapes
Could not find key "\"quoted\"" in parser output.
input sent to parser-cmd (PID 5236):
"\n" = "newline"
"\b" = "bell"
"\u00c0" = "latin capital letter A with grave"
"\"" = "just a quote"
["backsp\b\b"]
["\"quoted\""]
quote = true
["a.b"."\u00c0"]
output from parser-cmd (PID 5236) (stdout):
{
"\b": {"type": "string", "value": "bell"},
"\n": {"type": "string", "value": "newline"},
"\"": {"type": "string", "value": "just a quote"},
"\\u00c0": {"type": "string", "value": "latin capital letter A with grave"},
"backsp\\b\\b": {},
"\\\"quoted\\\"": {
"quote": {"type": "bool", "value": "true"}
},
"a.b": {
"\\u00c0": {}
}
}
want:
{
"\b": {"type": "string", "value": "bell"},
"\n": {"type": "string", "value": "newline"},
"\"": {"type": "string", "value": "just a quote"},
"backsp\b\b": {},
"À": {"type": "string", "value": "latin capital letter A with grave"},
"\"quoted\"": {
"quote": {"type": "bool", "value": "true"}
},
"a.b": {
"À": {}
}
}
FAIL valid/key/quoted-dots
Could not find key "table.withdot.escaped.dot" in parser output.
input sent to parser-cmd (PID 5246):
plain = 1
"with.dot" = 2
[plain_table]
plain = 3
"with.dot" = 4
[table.withdot]
plain = 5
"key.with.dots" = 6
"escaped\u002edot" = 7
output from parser-cmd (PID 5246) (stdout):
{
"plain": {"type": "integer", "value": "1"},
"with.dot": {"type": "integer", "value": "2"},
"plain_table": {
"plain": {"type": "integer", "value": "3"},
"with.dot": {"type": "integer", "value": "4"}
},
"table": {
"withdot": {
"escaped\\u002edot": {"type": "integer", "value": "7"},
"key.with.dots": {"type": "integer", "value": "6"},
"plain": {"type": "integer", "value": "5"}
}
}
}
want:
{
"plain": {"type": "integer", "value": "1"},
"with.dot": {"type": "integer", "value": "2"},
"plain_table": {
"plain": {"type": "integer", "value": "3"},
"with.dot": {"type": "integer", "value": "4"}
},
"table": {
"withdot": {
"escaped.dot": {"type": "integer", "value": "7"},
"key.with.dots": {"type": "integer", "value": "6"},
"plain": {"type": "integer", "value": "5"}
}
}
}
FAIL valid/key/quoted-unicode
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 781, in load_line
raise ValueError("Duplicate keys!")
ValueError: Duplicate keys!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Duplicate keys! (line 3 column 1 char 19)
Exit 1
input sent to parser-cmd (PID 5247):
"\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 (PID 5247) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 781, in load_line
raise ValueError("Duplicate keys!")
ValueError: Duplicate keys!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Duplicate keys! (line 3 column 1 char 19)
Exit 1
want:
FAIL valid/spec-1.0.0/array-0
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 880, in load_value
return (self.load_array(v), "array")
~~~~~~~~~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 1001, in load_array
a[b] = a[b] + ',' + a[b + 1]
~^^^^^^^
IndexError: list index out of range
Exit 1
input sent to parser-cmd (PID 5256):
integers = [ 1, 2, 3 ]
colors = [ "red", "yellow", "green" ]
nested_arrays_of_ints = [ [ 1, 2 ], [3, 4, 5] ]
nested_mixed_array = [ [ 1, 2 ], ["a", "b", "c"] ]
string_array = [ "all", 'strings', """are the same""", '''type''' ]
# Mixed-type arrays are allowed
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
contributors = [
"Foo Bar ",
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
]
output from parser-cmd (PID 5256) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
multibackslash)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 880, in load_value
return (self.load_array(v), "array")
~~~~~~~~~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 1001, in load_array
a[b] = a[b] + ',' + a[b + 1]
~^^^^^^^
IndexError: list index out of range
Exit 1
want:
FAIL valid/spec-1.0.0/keys-4
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 260, in loads
raise TomlDecodeError("Found invalid character in key name: '" +
item + "'. Try quoting the key name.",
original, i)
toml.decoder.TomlDecodeError: Found invalid character in key name: 'c'. Try quoting the key name. (line 2 column 8 char 57)
Exit 1
input sent to parser-cmd (PID 5277):
fruit.name = "banana" # this is best practice
fruit. color = "yellow" # same as fruit.color
fruit . flavor = "banana" # same as fruit.flavor
output from parser-cmd (PID 5277) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 260, in loads
raise TomlDecodeError("Found invalid character in key name: '" +
item + "'. Try quoting the key name.",
original, i)
toml.decoder.TomlDecodeError: Found invalid character in key name: 'c'. Try quoting the key name. (line 2 column 8 char 57)
Exit 1
want:
FAIL valid/spec-1.0.0/local-time-0
Values for key "lt2" don't match:
Expected: 0000-01-01 00:32:00.999 +0000 UTC
Your encoder: 0000-01-01 00:32:00.000999 +0000 UTC
input sent to parser-cmd (PID 5283):
lt1 = 07:32:00
lt2 = 00:32:00.999
output from parser-cmd (PID 5283) (stdout):
{
"lt1": {"type": "time-local", "value": "07:32:00.000000"},
"lt2": {"type": "time-local", "value": "00:32:00.000999"}
}
want:
{
"lt1": {"type": "time-local", "value": "07:32:00"},
"lt2": {"type": "time-local", "value": "00:32:00.999"}
}
FAIL valid/string/ends-in-whitespace-escape
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 395, in loads
value, vtype = decoder.load_value(multilinestr)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 866, in load_value
raise ValueError("Reserved escape sequence used")
ValueError: Reserved escape sequence used
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 397, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Reserved escape sequence used (line 6 column 1 char 28)
Exit 1
input sent to parser-cmd (PID 5310):
beee = """
heeee
geeee\
"""
output from parser-cmd (PID 5310) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 395, in loads
value, vtype = decoder.load_value(multilinestr)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 866, in load_value
raise ValueError("Reserved escape sequence used")
ValueError: Reserved escape sequence used
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 397, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Reserved escape sequence used (line 6 column 1 char 28)
Exit 1
want:
FAIL valid/string/multiline-quotes
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 362, in loads
raise TomlDecodeError("Unterminated string found."
" Reached end of file.", original, len(s))
toml.decoder.TomlDecodeError: Unterminated string found. Reached end of file. (line 27 column 1 char 664)
Exit 1
input sent to parser-cmd (PID 5318):
# Make sure that quotes inside multiline strings are allowed, including right
# after the opening '''/""" and before the closing '''/"""
lit_one = ''''one quote''''
lit_two = '''''two quotes'''''
lit_one_space = ''' 'one quote' '''
lit_two_space = ''' ''two quotes'' '''
one = """"one quote""""
two = """""two quotes"""""
one_space = """ "one quote" """
two_space = """ ""two quotes"" """
mismatch1 = """aaa'''bbb"""
mismatch2 = '''aaa"""bbb'''
# Three opening """, then one escaped ", then two "" (allowed), and then three
# closing """
escaped = """lol\""""""
five-quotes = """
Closing with five quotes
"""""
four-quotes = """
Closing with four quotes
""""
output from parser-cmd (PID 5318) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 362, in loads
raise TomlDecodeError("Unterminated string found."
" Reached end of file.", original, len(s))
toml.decoder.TomlDecodeError: Unterminated string found. Reached end of file. (line 27 column 1 char 664)
Exit 1
want:
FAIL valid/string/raw-multiline
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 340, in loads
raise TomlDecodeError("Unbalanced quotes", original, i)
toml.decoder.TomlDecodeError: Unbalanced quotes (line 20 column 50 char 532)
Exit 1
input sent to parser-cmd (PID 5323):
# Single ' should be allowed.
oneline = '''This string has a ' quote character.'''
# A newline immediately following the opening delimiter will be trimmed.
firstnl = '''
This string has a ' quote character.'''
# All other whitespace and newline characters remain intact.
multiline = '''
This string
has ' a quote character
and more than
one newline
in it.'''
# Tab character in literal string does not need to be escaped
multiline_with_tab = '''First line
Followed by a tab'''
this-str-has-apostrophes='''' there's one already
'' two more
'''''
output from parser-cmd (PID 5323) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 340, in loads
raise TomlDecodeError("Unbalanced quotes", original, i)
toml.decoder.TomlDecodeError: Unbalanced quotes (line 20 column 50 char 532)
Exit 1
want:
FAIL valid/table/array-empty-name
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 463, in loads
raise TomlDecodeError("Can't have a keygroup with an empty "
"name", original, pos)
toml.decoder.TomlDecodeError: Can't have a keygroup with an empty name (line 3 column 1 char 33)
Exit 1
input sent to parser-cmd (PID 5329):
# Silly thing to do, but valid.
[['']]
a = 1
[['']]
a = 2
output from parser-cmd (PID 5329) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 463, in loads
raise TomlDecodeError("Can't have a keygroup with an empty "
"name", original, pos)
toml.decoder.TomlDecodeError: Can't have a keygroup with an empty name (line 3 column 1 char 33)
Exit 1
want:
FAIL valid/table/empty-name
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 463, in loads
raise TomlDecodeError("Can't have a keygroup with an empty "
"name", original, pos)
toml.decoder.TomlDecodeError: Can't have a keygroup with an empty name (line 1 column 1 char 0)
Exit 1
input sent to parser-cmd (PID 5338):
['']
x = 1
["".a]
x = 2
[a.'']
x = 3
output from parser-cmd (PID 5338) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/decoding_test.py", line 37, in
tdata = toml.loads(sys.stdin.read())
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/decoder.py", line 463, in loads
raise TomlDecodeError("Can't have a keygroup with an empty "
"name", original, pos)
toml.decoder.TomlDecodeError: Can't have a keygroup with an empty name (line 1 column 1 char 0)
Exit 1
want:
FAIL invalid/array/double-comma-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5353):
double-comma-1 = [1,,2]
output from parser-cmd (PID 5353) (stdout):
{
"double-comma-1": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
}
want:
Exit code 1
FAIL invalid/array/double-comma-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5354):
double-comma-2 = [1,2,,]
output from parser-cmd (PID 5354) (stdout):
{
"double-comma-2": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
}
want:
Exit code 1
FAIL invalid/array/double-comma-1
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5355):
double-comma-1 = [1,,2]
output from parser-cmd (PID 5355) (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 (PID 5356):
double-comma-2 = [1,2,,]
output from parser-cmd (PID 5356) (stdout):
{
"double-comma-2": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
}
want:
Exit code 1
FAIL invalid/array/extending-table
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5358):
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 (PID 5358) (stdout):
{
"a": [{
"b": {"type": "integer", "value": "1"},
"c": {
"foo": {"type": "integer", "value": "1"}
}
}]
}
want:
Exit code 1
FAIL invalid/array/no-close-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5361):
no-close-1 = [ 1, 2, 3
output from parser-cmd (PID 5361) (stdout):
{
"no-close-1": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
}
want:
Exit code 1
FAIL invalid/array/no-close-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5362):
no-close-2 = [1,
output from parser-cmd (PID 5362) (stdout):
{
"no-close-2": [{"type": "integer", "value": "1"}]
}
want:
Exit code 1
FAIL invalid/array/no-close-03
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5363):
no-close-3 = [42 #]
output from parser-cmd (PID 5363) (stdout):
{
"no-close-3": [{"type": "integer", "value": "4"}]
}
want:
Exit code 1
FAIL invalid/array/no-close-04
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5364):
no-close-4 = [{ key = 42
output from parser-cmd (PID 5364) (stdout):
{
"no-close-4": []
}
want:
Exit code 1
FAIL invalid/array/no-close-05
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5365):
no-close-5 = [{ key = 42}
output from parser-cmd (PID 5365) (stdout):
{
"no-close-5": []
}
want:
Exit code 1
FAIL invalid/array/no-close-06
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5366):
no-close-6 = [{ key = 42 #}]
output from parser-cmd (PID 5366) (stdout):
{
"no-close-6": []
}
want:
Exit code 1
FAIL invalid/array/no-close-07
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5367):
no-close-7 = [{ key = 42} #]
output from parser-cmd (PID 5367) (stdout):
{
"no-close-7": []
}
want:
Exit code 1
FAIL invalid/array/no-close-08
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5368):
no-close-8 = [
output from parser-cmd (PID 5368) (stdout):
{
"no-close-8": []
}
want:
Exit code 1
FAIL invalid/array/no-close-1
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5369):
no-close-1 = [ 1, 2, 3
output from parser-cmd (PID 5369) (stdout):
{
"no-close-1": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
}
want:
Exit code 1
FAIL invalid/array/no-close-2
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5370):
no-close-2 = [1,
output from parser-cmd (PID 5370) (stdout):
{
"no-close-2": [{"type": "integer", "value": "1"}]
}
want:
Exit code 1
FAIL invalid/array/no-close-3
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5371):
no-close-3 = [42 #]
output from parser-cmd (PID 5371) (stdout):
{
"no-close-3": [{"type": "integer", "value": "4"}]
}
want:
Exit code 1
FAIL invalid/array/no-close-4
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5372):
no-close-4 = [{ key = 42
output from parser-cmd (PID 5372) (stdout):
{
"no-close-4": []
}
want:
Exit code 1
FAIL invalid/array/no-close-5
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5373):
no-close-5 = [{ key = 42}
output from parser-cmd (PID 5373) (stdout):
{
"no-close-5": []
}
want:
Exit code 1
FAIL invalid/array/no-close-6
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5374):
no-close-6 = [{ key = 42 #}]
output from parser-cmd (PID 5374) (stdout):
{
"no-close-6": []
}
want:
Exit code 1
FAIL invalid/array/no-close-7
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5375):
no-close-7 = [{ key = 42} #]
output from parser-cmd (PID 5375) (stdout):
{
"no-close-7": []
}
want:
Exit code 1
FAIL invalid/array/no-close-8
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5376):
no-close-8 = [
output from parser-cmd (PID 5376) (stdout):
{
"no-close-8": []
}
want:
Exit code 1
FAIL invalid/array/no-close-table-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5377):
x = [{ key = 42
output from parser-cmd (PID 5377) (stdout):
{
"x": []
}
want:
Exit code 1
FAIL invalid/array/no-close-table-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5378):
x = [{ key = 42 #
output from parser-cmd (PID 5378) (stdout):
{
"x": []
}
want:
Exit code 1
FAIL invalid/array/no-comma-03
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5381):
no-comma-3 = [ 1 #,]
output from parser-cmd (PID 5381) (stdout):
{
"no-comma-3": []
}
want:
Exit code 1
FAIL invalid/array/no-comma-3
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5384):
no-comma-3 = [ 1 #,]
output from parser-cmd (PID 5384) (stdout):
{
"no-comma-3": []
}
want:
Exit code 1
FAIL invalid/array/only-comma-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5385):
only-comma-1 = [,]
output from parser-cmd (PID 5385) (stdout):
{
"only-comma-1": []
}
want:
Exit code 1
FAIL invalid/array/only-comma-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5386):
only-comma-2 = [,,]
output from parser-cmd (PID 5386) (stdout):
{
"only-comma-2": []
}
want:
Exit code 1
FAIL invalid/array/only-comma-1
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5387):
only-comma-1 = [,]
output from parser-cmd (PID 5387) (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 (PID 5388):
only-comma-2 = [,,]
output from parser-cmd (PID 5388) (stdout):
{
"only-comma-2": []
}
want:
Exit code 1
FAIL invalid/array/tables-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5389):
# INVALID TOML DOC
fruit = []
[[fruit]] # Not allowed
output from parser-cmd (PID 5389) (stdout):
{
"fruit": [{}]
}
want:
Exit code 1
FAIL invalid/control/comment-cr
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5413):
comment-cr = "Carriage return in comment" #
a=1
output from parser-cmd (PID 5413) (stdout):
{
"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 (PID 5414):
comment-del = "0x7f" #
output from parser-cmd (PID 5414) (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 (PID 5415):
comment-ff = "0x7f" #
output from parser-cmd (PID 5415) (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 (PID 5417):
comment-lf = "ctrl-P" #
output from parser-cmd (PID 5417) (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 (PID 5416):
comment-null = "null" #
output from parser-cmd (PID 5416) (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 (PID 5418):
comment-us = "ctrl-_" #
output from parser-cmd (PID 5418) (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 (PID 5419):
multi-cr = """null
"""
output from parser-cmd (PID 5419) (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 (PID 5420):
multi-del = """null"""
output from parser-cmd (PID 5420) (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 (PID 5421):
multi-lf = """null"""
output from parser-cmd (PID 5421) (stdout):
{
"multi-lf": {"type": "string", "value": "null\u0010"}
}
want:
Exit code 1
FAIL invalid/control/multi-null
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5422):
multi-null = """null """
output from parser-cmd (PID 5422) (stdout):
{
"multi-null": {"type": "string", "value": "null\u0000"}
}
want:
Exit code 1
FAIL invalid/control/multi-us
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5423):
multi-us = """null"""
output from parser-cmd (PID 5423) (stdout):
{
"multi-us": {"type": "string", "value": "null\u001f"}
}
want:
Exit code 1
FAIL invalid/control/rawmulti-cr
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5427):
rawmulti-cr = '''null
'''
output from parser-cmd (PID 5427) (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 (PID 5428):
rawmulti-del = '''null'''
output from parser-cmd (PID 5428) (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 (PID 5429):
rawmulti-lf = '''null'''
output from parser-cmd (PID 5429) (stdout):
{
"rawmulti-lf": {"type": "string", "value": "null\u0010"}
}
want:
Exit code 1
FAIL invalid/control/rawmulti-null
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5430):
rawmulti-null = '''null '''
output from parser-cmd (PID 5430) (stdout):
{
"rawmulti-null": {"type": "string", "value": "null\u0000"}
}
want:
Exit code 1
FAIL invalid/control/rawmulti-us
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5431):
rawmulti-us = '''null'''
output from parser-cmd (PID 5431) (stdout):
{
"rawmulti-us": {"type": "string", "value": "null\u001f"}
}
want:
Exit code 1
FAIL invalid/control/rawstring-cr
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5432):
rawstring-cr = 'null
'
output from parser-cmd (PID 5432) (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 (PID 5433):
rawstring-del = 'null'
output from parser-cmd (PID 5433) (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 (PID 5434):
rawstring-lf = 'null'
output from parser-cmd (PID 5434) (stdout):
{
"rawstring-lf": {"type": "string", "value": "null\u0010"}
}
want:
Exit code 1
FAIL invalid/control/rawstring-null
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5435):
rawstring-null = 'null '
output from parser-cmd (PID 5435) (stdout):
{
"rawstring-null": {"type": "string", "value": "null\u0000"}
}
want:
Exit code 1
FAIL invalid/control/rawstring-us
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5436):
rawstring-us = 'null'
output from parser-cmd (PID 5436) (stdout):
{
"rawstring-us": {"type": "string", "value": "null\u001f"}
}
want:
Exit code 1
FAIL invalid/control/string-bs
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5437):
string-bs = "backspace"
output from parser-cmd (PID 5437) (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 (PID 5438):
string-cr = "null
"
output from parser-cmd (PID 5438) (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 (PID 5439):
string-del = "null"
output from parser-cmd (PID 5439) (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 (PID 5440):
string-lf = "null"
output from parser-cmd (PID 5440) (stdout):
{
"string-lf": {"type": "string", "value": "null\u0010"}
}
want:
Exit code 1
FAIL invalid/control/string-null
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5441):
string-null = "null "
output from parser-cmd (PID 5441) (stdout):
{
"string-null": {"type": "string", "value": "null\u0000"}
}
want:
Exit code 1
FAIL invalid/control/string-us
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5442):
string-us = "null"
output from parser-cmd (PID 5442) (stdout):
{
"string-us": {"type": "string", "value": "null\u001f"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-minus-minute-1digit
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5460):
foo = 1997-09-09T09:09:09.09+09:9
output from parser-cmd (PID 5460) (stdout):
{
"foo": {"type": "datetime", "value": "1997-09-09T09:09:09.090000+09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-minus-no-hour-minute
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5462):
foo = 1997-09-09T09:09:09.09+
output from parser-cmd (PID 5462) (stdout):
{
"foo": {"type": "datetime-local", "value": "1997-09-09T09:09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-minus-no-hour-minute-sep
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5461):
foo = 1997-09-09T09:09:09.09+0909
output from parser-cmd (PID 5461) (stdout):
{
"foo": {"type": "datetime", "value": "1997-09-09T09:09:09.090000+09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-minus-no-minute
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5463):
foo = 1997-09-09T09:09:09.09+09
output from parser-cmd (PID 5463) (stdout):
{
"foo": {"type": "datetime-local", "value": "1997-09-09T09:09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-overflow-minute
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5465):
# Minute must be 00-59; we allow 60 too because some people do write offsets of
# 60 minutes
d = 1985-06-18 17:04:07+12:61
output from parser-cmd (PID 5465) (stdout):
{
"d": {"type": "datetime", "value": "1985-06-18T17:04:07+13:01"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-plus-minute-1digit
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5466):
foo = 1997-09-09T09:09:09.09+09:9
output from parser-cmd (PID 5466) (stdout):
{
"foo": {"type": "datetime", "value": "1997-09-09T09:09:09.090000+09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-plus-no-hour-minute
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5468):
foo = 1997-09-09T09:09:09.09+
output from parser-cmd (PID 5468) (stdout):
{
"foo": {"type": "datetime-local", "value": "1997-09-09T09:09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-plus-no-hour-minute-sep
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5467):
foo = 1997-09-09T09:09:09.09+0909
output from parser-cmd (PID 5467) (stdout):
{
"foo": {"type": "datetime", "value": "1997-09-09T09:09:09.090000+09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-plus-no-minute
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5469):
foo = 1997-09-09T09:09:09.09+09
output from parser-cmd (PID 5469) (stdout):
{
"foo": {"type": "datetime-local", "value": "1997-09-09T09:09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/second-trailing-dot
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5474):
foo = 1997-09-09T09:09:09.
output from parser-cmd (PID 5474) (stdout):
{
"foo": {"type": "datetime-local", "value": "1997-09-09T09:09:09"}
}
want:
Exit code 1
FAIL invalid/datetime/second-trailing-dotz
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5475):
foo = 2016-09-09T09:09:09.Z
output from parser-cmd (PID 5475) (stdout):
{
"foo": {"type": "datetime-local", "value": "2016-09-09T09:09:09"}
}
want:
Exit code 1
FAIL invalid/encoding/ideographic-space
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5488):
# First on next line is U+3000 IDEOGRAPHIC SPACE
foo = "bar"
output from parser-cmd (PID 5488) (stdout):
{
"foo": {"type": "string", "value": "bar"}
}
want:
Exit code 1
FAIL invalid/float/exp-dot-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5498):
exp-point-2 = 1.e2
output from parser-cmd (PID 5498) (stdout):
{
"exp-point-2": {"type": "float", "value": "100.0"}
}
want:
Exit code 1
FAIL invalid/float/exp-dot-03
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5499):
exp-point-3 = 3.e+20
output from parser-cmd (PID 5499) (stdout):
{
"exp-point-3": {"type": "float", "value": "3e+20"}
}
want:
Exit code 1
FAIL invalid/float/exp-leading-us
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5505):
exp-leading-us = 1e_23
output from parser-cmd (PID 5505) (stdout):
{
"exp-leading-us": {"type": "float", "value": "1e+23"}
}
want:
Exit code 1
FAIL invalid/float/exp-point-2
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5507):
exp-point-2 = 1.e2
output from parser-cmd (PID 5507) (stdout):
{
"exp-point-2": {"type": "float", "value": "100.0"}
}
want:
Exit code 1
FAIL invalid/float/exp-point-3
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5508):
exp-point-3 = 3.e+20
output from parser-cmd (PID 5508) (stdout):
{
"exp-point-3": {"type": "float", "value": "3e+20"}
}
want:
Exit code 1
FAIL invalid/float/exp-trailing-us-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5509):
exp-trailing-us-1 = 1_e2
output from parser-cmd (PID 5509) (stdout):
{
"exp-trailing-us-1": {"type": "float", "value": "100.0"}
}
want:
Exit code 1
FAIL invalid/float/exp-trailing-us-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5510):
exp-trailing-us-2 = 1.2_e2
output from parser-cmd (PID 5510) (stdout):
{
"exp-trailing-us-2": {"type": "float", "value": "120.0"}
}
want:
Exit code 1
FAIL invalid/float/exp-trailing-us-1
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5511):
exp-trailing-us-1 = 1_e2
output from parser-cmd (PID 5511) (stdout):
{
"exp-trailing-us-1": {"type": "float", "value": "100.0"}
}
want:
Exit code 1
FAIL invalid/float/exp-trailing-us-2
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5512):
exp-trailing-us-2 = 1.2_e2
output from parser-cmd (PID 5512) (stdout):
{
"exp-trailing-us-2": {"type": "float", "value": "120.0"}
}
want:
Exit code 1
FAIL invalid/float/inf-capital
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5514):
v = Inf
output from parser-cmd (PID 5514) (stdout):
{
"v": {"type": "float", "value": "inf"}
}
want:
Exit code 1
FAIL invalid/float/inf_underscore
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5521):
inf_underscore = in_f
output from parser-cmd (PID 5521) (stdout):
{
"inf_underscore": {"type": "float", "value": "inf"}
}
want:
Exit code 1
FAIL invalid/float/nan-capital
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5532):
v = NaN
output from parser-cmd (PID 5532) (stdout):
{
"v": {"type": "float", "value": "nan"}
}
want:
Exit code 1
FAIL invalid/float/nan_underscore
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5538):
nan_underscore = na_n
output from parser-cmd (PID 5538) (stdout):
{
"nan_underscore": {"type": "float", "value": "nan"}
}
want:
Exit code 1
FAIL invalid/float/trailing-us-exp-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5551):
trailing-us-exp-1 = 1_e2
output from parser-cmd (PID 5551) (stdout):
{
"trailing-us-exp-1": {"type": "float", "value": "100.0"}
}
want:
Exit code 1
FAIL invalid/float/trailing-us-exp-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5552):
trailing-us-exp-2 = 1.2_e2
output from parser-cmd (PID 5552) (stdout):
{
"trailing-us-exp-2": {"type": "float", "value": "120.0"}
}
want:
Exit code 1
FAIL invalid/inline-table/duplicate-key-03
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5562):
tbl = { fruit = { apple.color = "red" }, fruit.apple.texture = { smooth = true } }
output from parser-cmd (PID 5562) (stdout):
{
"tbl": {
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"texture": {
"smooth": {"type": "bool", "value": "true"}
}
}
}
}
}
want:
Exit code 1
FAIL invalid/inline-table/no-close-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5571):
a={
output from parser-cmd (PID 5571) (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 (PID 5576):
a={}
# Inline tables are immutable and can't be extended
[a.b]
output from parser-cmd (PID 5576) (stdout):
{
"a": {
"b": {}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-08
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5582):
tab = { inner = { dog = "best" }, inner.cat = "worst" }
output from parser-cmd (PID 5582) (stdout):
{
"tab": {
"inner": {
"cat": {"type": "string", "value": "worst"},
"dog": {"type": "string", "value": "best"}
}
}
}
want:
Exit code 1
FAIL invalid/integer/double-sign-nex
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5589):
double-sign-nex = --99
output from parser-cmd (PID 5589) (stdout):
{
"double-sign-nex": {"type": "integer", "value": "99"}
}
want:
Exit code 1
FAIL invalid/integer/double-sign-plus
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5590):
double-sign-plus = ++99
output from parser-cmd (PID 5590) (stdout):
{
"double-sign-plus": {"type": "integer", "value": "99"}
}
want:
Exit code 1
FAIL invalid/integer/us-after-bin
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5629):
us-after-bin = 0b_1
output from parser-cmd (PID 5629) (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 (PID 5630):
us-after-hex = 0x_1
output from parser-cmd (PID 5630) (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 (PID 5631):
us-after-oct = 0o_1
output from parser-cmd (PID 5631) (stdout):
{
"us-after-oct": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/bare-invalid-character-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5635):
! = 123
output from parser-cmd (PID 5635) (stdout):
{
"!": {"type": "integer", "value": "123"}
}
want:
Exit code 1
FAIL invalid/key/duplicate-keys-05
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5645):
a = 1
"\u0061" = 1
output from parser-cmd (PID 5645) (stdout):
{
"\\u0061": {"type": "integer", "value": "1"},
"a": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/duplicate-keys-06
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5646):
"a'b" = 1
"a\u0027b" = 2
output from parser-cmd (PID 5646) (stdout):
{
"a'b": {"type": "integer", "value": "1"},
"a\\u0027b": {"type": "integer", "value": "2"}
}
want:
Exit code 1
FAIL invalid/key/escape
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5650):
\u00c0 = "latin capital letter A with grave"
output from parser-cmd (PID 5650) (stdout):
{
"\\u00c0": {"type": "string", "value": "latin capital letter A with grave"}
}
want:
Exit code 1
FAIL invalid/key/no-eol-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5663):
0=0r=false
output from parser-cmd (PID 5663) (stdout):
{
"0=0r": {"type": "bool", "value": "false"}
}
want:
Exit code 1
FAIL invalid/key/no-eol-06
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5667):
0=0r0=0r=false
output from parser-cmd (PID 5667) (stdout):
{
"0=0r0=0r": {"type": "bool", "value": "false"}
}
want:
Exit code 1
FAIL invalid/key/no-eol-07
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5668):
0=0r0=0r=falsefal=false
output from parser-cmd (PID 5668) (stdout):
{
"0=0r0=0r=falsefal": {"type": "bool", "value": "false"}
}
want:
Exit code 1
FAIL invalid/key/special-character
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5678):
μ = "greek small letter mu"
output from parser-cmd (PID 5678) (stdout):
{
"μ": {"type": "string", "value": "greek small letter mu"}
}
want:
Exit code 1
FAIL invalid/key/start-dot
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5680):
.key = 1
output from parser-cmd (PID 5680) (stdout):
{
"key": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/two-equals-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5682):
a==1
output from parser-cmd (PID 5682) (stdout):
{
"a=": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/key/two-equals-03
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5683):
a=b=1
output from parser-cmd (PID 5683) (stdout):
{
"a=b": {"type": "integer", "value": "1"}
}
want:
Exit code 1
FAIL invalid/local-time/trailing-dot
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5724):
t = 12:13:14.
output from parser-cmd (PID 5724) (stdout):
{
"t": {"type": "time-local", "value": "12:13:14.000000"}
}
want:
Exit code 1
FAIL invalid/local-time/trailing-dotdot
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5725):
t = 12:13:14..
output from parser-cmd (PID 5725) (stdout):
{
"t": {"type": "time-local", "value": "12:13:14.000000"}
}
want:
Exit code 1
FAIL invalid/spec-1.0.0/inline-table-2-0
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5726):
[product]
type = { name = "Nail" }
type.edible = false # INVALID
output from parser-cmd (PID 5726) (stdout):
{
"product": {
"type": {
"edible": {"type": "bool", "value": "false"},
"name": {"type": "string", "value": "Nail"}
}
}
}
want:
Exit code 1
FAIL invalid/table/append-with-dotted-keys-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5823):
# 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 (PID 5823) (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-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5824):
# 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 (PID 5824) (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/multiline-key-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5854):
["""tbl"""]
k = 1
output from parser-cmd (PID 5854) (stdout):
{
"\"\"tbl\"\"": {
"k": {"type": "integer", "value": "1"}
}
}
want:
Exit code 1
FAIL invalid/table/multiline-key-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 5855):
['''tbl''']
k = 1
output from parser-cmd (PID 5855) (stdout):
{
"''tbl''": {
"k": {"type": "integer", "value": "1"}
}
}
want:
Exit code 1
toml-test v2025-04-23 [./tests/decoding_test.py]: using embedded tests
valid tests: 183 passed, 22 failed
invalid tests: 418 passed, 111 failed
==> ENCODER TESTS
FAIL valid/array/mixed-string-table
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 203, in dump_sections
s, d = self.dump_sections(a, sup + qsection)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 193, in dump_sections
if not isinstance(o[section], dict):
~^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Exit 1
input sent to parser-cmd (PID 5942):
{
"contributors": [
{"type": "string", "value": "Foo Bar \u003cfoo@example.com\u003e"},
{
"email": {"type": "string", "value": "bazqux@example.com"},
"name": {"type": "string", "value": "Baz Qux"},
"url": {"type": "string", "value": "https://example.com/bazqux"}
}
],
"mixed": [
{
"k": {"type": "string", "value": "a"}
},
{"type": "string", "value": "b"},
{"type": "integer", "value": "1"}
]
}
output from parser-cmd (PID 5942) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 203, in dump_sections
s, d = self.dump_sections(a, sup + qsection)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 193, in dump_sections
if not isinstance(o[section], dict):
~^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Exit 1
want:
FAIL valid/array/nested-inline-table
Could not find key "a.b" in encoder output
input sent to parser-cmd (PID 5932):
{
"a": [{
"b": {}
}]
}
output from parser-cmd (PID 5932) (stdout):
[[a]]
want:
a = [ { b = {} } ]
FAIL valid/datetime/local-time
Values for key "milliseconds" differ:
Expected: 0000-01-01 10:32:00.555 +0100 time-local (time.Time)
Your encoder: 0000-01-01 10:32:00.000555 +0100 time-local (time.Time)
input sent to parser-cmd (PID 5980):
{
"besttimeever": {"type": "time-local", "value": "17:45:00"},
"milliseconds": {"type": "time-local", "value": "10:32:00.555"}
}
output from parser-cmd (PID 5980) (stdout):
besttimeever = 17:45:00
milliseconds = 10:32:00.000555
want:
besttimeever = 17:45:00
milliseconds = 10:32:00.555
FAIL valid/inline-table/key-dotted-5
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 203, in dump_sections
s, d = self.dump_sections(a, sup + qsection)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 193, in dump_sections
if not isinstance(o[section], dict):
~^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Exit 1
input sent to parser-cmd (PID 6062):
{
"arr-1": [{
"a": {
"b": {"type": "integer", "value": "1"}
}
}],
"arr-2": [
{"type": "string", "value": "str"},
{
"a": {
"b": {"type": "integer", "value": "1"}
}
}
],
"arr-3": [
{
"a": {
"b": {"type": "integer", "value": "1"}
}
},
{
"a": {
"b": {"type": "integer", "value": "2"}
}
}
],
"arr-4": [
{"type": "string", "value": "str"},
{
"a": {
"b": {"type": "integer", "value": "1"}
}
},
{
"a": {
"b": {"type": "integer", "value": "2"}
}
}
]
}
output from parser-cmd (PID 6062) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 203, in dump_sections
s, d = self.dump_sections(a, sup + qsection)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 193, in dump_sections
if not isinstance(o[section], dict):
~^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Exit 1
want:
FAIL valid/inline-table/nest
Key "arr_arr_tbl_empty" (type "table"):
Expected: map[string]any(nil)
Your encoder: map[string]any
input sent to parser-cmd (PID 6066):
{
"arr_arr_tbl_empty": [[{}]],
"arr_arr_tbl_val": [[{
"one": {"type": "integer", "value": "1"}
}]],
"arr_arr_tbls": [[
{
"one": {"type": "integer", "value": "1"}
},
{
"two": {"type": "integer", "value": "2"}
}
]],
"arr_tbl_tbl": [{
"tbl": {
"one": {"type": "integer", "value": "1"}
}
}],
"tbl_arr_tbl": {"arr_tbl": [{
"one": {"type": "integer", "value": "1"}
}]},
"tbl_tbl_empty": {
"tbl_0": {}
},
"tbl_tbl_val": {
"tbl_1": {
"one": {"type": "integer", "value": "1"}
}
}
}
output from parser-cmd (PID 6066) (stdout):
arr_arr_tbl_empty = [ [ [],],]
arr_arr_tbl_val = [ [ [ "one",],],]
arr_arr_tbls = [ [ [ "one",], [ "two",],],]
[[arr_tbl_tbl]]
[arr_tbl_tbl.tbl]
one = 1
[tbl_arr_tbl]
[[tbl_arr_tbl.arr_tbl]]
one = 1
[tbl_tbl_empty.tbl_0]
[tbl_tbl_val.tbl_1]
one = 1
want:
tbl_tbl_empty = { tbl_0 = {} }
tbl_tbl_val = { tbl_1 = { one = 1 } }
tbl_arr_tbl = { arr_tbl = [ { one = 1 } ] }
arr_tbl_tbl = [ { tbl = { one = 1 } } ]
# Array-of-array-of-table is interesting because it can only
# be represented in inline form.
arr_arr_tbl_empty = [ [ {} ] ]
arr_arr_tbl_val = [ [ { one = 1 } ] ]
arr_arr_tbls = [ [ { one = 1 }, { two = 2 } ] ]
FAIL valid/key/escapes
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 192, in dump_sections
qsection = _dump_str(section)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 113, in _dump_str
v = [v[0] + joiner + v[1]] + v[2:]
~^^^
IndexError: list index out of range
Exit 1
input sent to parser-cmd (PID 6089):
{
"\b": {"type": "string", "value": "bell"},
"\n": {"type": "string", "value": "newline"},
"\"": {"type": "string", "value": "just a quote"},
"backsp\b\b": {},
"À": {"type": "string", "value": "latin capital letter A with grave"},
"\"quoted\"": {
"quote": {"type": "bool", "value": "true"}
},
"a.b": {
"À": {}
}
}
output from parser-cmd (PID 6089) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 192, in dump_sections
qsection = _dump_str(section)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 113, in _dump_str
v = [v[0] + joiner + v[1]] + v[2:]
~^^^
IndexError: list index out of range
Exit 1
want:
FAIL valid/key/quoted-unicode
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 192, in dump_sections
qsection = _dump_str(section)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 113, in _dump_str
v = [v[0] + joiner + v[1]] + v[2:]
~^^^
IndexError: list index out of range
Exit 1
input sent to parser-cmd (PID 6101):
{
"\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"}
}
output from parser-cmd (PID 6101) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 192, in dump_sections
qsection = _dump_str(section)
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 113, in _dump_str
v = [v[0] + joiner + v[1]] + v[2:]
~^^^
IndexError: list index out of range
Exit 1
want:
FAIL valid/spec-1.0.0/array-0
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 203, in dump_sections
s, d = self.dump_sections(a, sup + qsection)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 193, in dump_sections
if not isinstance(o[section], dict):
~^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Exit 1
input sent to parser-cmd (PID 6110):
{
"colors": [
{"type": "string", "value": "red"},
{"type": "string", "value": "yellow"},
{"type": "string", "value": "green"}
],
"contributors": [
{"type": "string", "value": "Foo Bar \u003cfoo@example.com\u003e"},
{
"email": {"type": "string", "value": "bazqux@example.com"},
"name": {"type": "string", "value": "Baz Qux"},
"url": {"type": "string", "value": "https://example.com/bazqux"}
}
],
"integers": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
],
"nested_arrays_of_ints": [
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
[
{"type": "integer", "value": "3"},
{"type": "integer", "value": "4"},
{"type": "integer", "value": "5"}
]
],
"nested_mixed_array": [
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
[
{"type": "string", "value": "a"},
{"type": "string", "value": "b"},
{"type": "string", "value": "c"}
]
],
"numbers": [
{"type": "float", "value": "0.1"},
{"type": "float", "value": "0.2"},
{"type": "float", "value": "0.5"},
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "5"}
],
"string_array": [
{"type": "string", "value": "all"},
{"type": "string", "value": "strings"},
{"type": "string", "value": "are the same"},
{"type": "string", "value": "type"}
]
}
output from parser-cmd (PID 6110) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 203, in dump_sections
s, d = self.dump_sections(a, sup + qsection)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 193, in dump_sections
if not isinstance(o[section], dict):
~^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Exit 1
want:
FAIL valid/spec-1.0.0/local-time-0
Values for key "lt2" differ:
Expected: 0000-01-01 00:32:00.999 +0100 time-local (time.Time)
Your encoder: 0000-01-01 00:32:00.000999 +0100 time-local (time.Time)
input sent to parser-cmd (PID 6176):
{
"lt1": {"type": "time-local", "value": "07:32:00"},
"lt2": {"type": "time-local", "value": "00:32:00.999"}
}
output from parser-cmd (PID 6176) (stdout):
lt1 = 07:32:00
lt2 = 00:32:00.000999
want:
lt1 = 07:32:00
lt2 = 00:32:00.999
FAIL valid/string/escape-tricky
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 226, in dump_sections
unicode(self.dump_value(o[section])) + '\n')
~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 180, in dump_value
return dump_fn(v) if dump_fn is not None else self.dump_funcs[str](v)
~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 113, in _dump_str
v = [v[0] + joiner + v[1]] + v[2:]
~^^^
IndexError: list index out of range
Exit 1
input sent to parser-cmd (PID 6204):
{
"end_esc": {"type": "string", "value": "String does not end here\" but ends here\\"},
"lit_end_esc": {"type": "string", "value": "String ends here\\"},
"lit_multiline_end": {"type": "string", "value": "There is no escape\\"},
"lit_multiline_not_unicode": {"type": "string", "value": "\\u007f"},
"multiline_end_esc": {"type": "string", "value": "When will it end? \"\"\"...\"\"\" should be here\""},
"multiline_not_unicode": {"type": "string", "value": "\\u0041"},
"multiline_unicode": {"type": "string", "value": " "}
}
output from parser-cmd (PID 6204) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 226, in dump_sections
unicode(self.dump_value(o[section])) + '\n')
~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 180, in dump_value
return dump_fn(v) if dump_fn is not None else self.dump_funcs[str](v)
~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 113, in _dump_str
v = [v[0] + joiner + v[1]] + v[2:]
~^^^
IndexError: list index out of range
Exit 1
want:
FAIL valid/string/escaped-escape
Values for key "answer" differ:
Expected: \x64 (string)
Your encoder: d (string)
input sent to parser-cmd (PID 6205):
{
"answer": {"type": "string", "value": "\\x64"}
}
output from parser-cmd (PID 6205) (stdout):
answer = "\u0064"
want:
answer = "\\x64"
FAIL valid/string/escapes
Values for key "backspace" differ:
Expected: |. (string)
Your encoder: |x08. (string)
input sent to parser-cmd (PID 6206):
{
"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."}
}
output from parser-cmd (PID 6206) (stdout):
backslash = "|\\."
backspace = "|x08."
carriage = "|\r."
delete = "|x7f."
formfeed = "|x0c."
newline = "|\n."
notunicode1 = "|\\u."
notunicode2 = "|\\u."
notunicode3 = "|\\u0075."
notunicode4 = "|\\u."
quote = "|\"."
tab = "|\t."
unitseparator = "|x1f."
want:
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."
FAIL valid/string/quoted-unicode
Values for key "basic_string" differ:
Expected: ~ ÿ 𐀀 (string)
Your encoder: ~ x80 ÿ 𐀀 (string)
input sent to parser-cmd (PID 6240):
{
"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"
}
}
output from parser-cmd (PID 6240) (stdout):
basic_string = "~ x80 ÿ \ud7ff \ue000 \uffff 𐀀 \U0010ffff"
escaped_string = "00 x08 x0c A x7f x80 ÿ \ud7ff \ue000 \uffff 𐀀 \U0010ffff"
literal_string = "~ x80 ÿ \ud7ff \ue000 \uffff 𐀀 \U0010ffff"
not_escaped_string = "\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff"
want:
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 = '~ ÿ 𐀀 '
FAIL valid/string/unicode-escape
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 226, in dump_sections
unicode(self.dump_value(o[section])) + '\n')
~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 180, in dump_value
return dump_fn(v) if dump_fn is not None else self.dump_funcs[str](v)
~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 113, in _dump_str
v = [v[0] + joiner + v[1]] + v[2:]
~^^^
IndexError: list index out of range
Exit 1
input sent to parser-cmd (PID 6247):
{
"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"}
}
output from parser-cmd (PID 6247) (stderr):
Traceback (most recent call last):
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/./tests/encoding_test.py", line 28, in
print(toml.dumps({k: convert(v) for (k, v) in j.items()}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 60, in dumps
addtoretval, sections = encoder.dump_sections(o, "")
~~~~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 226, in dump_sections
unicode(self.dump_value(o[section])) + '\n')
~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 180, in dump_value
return dump_fn(v) if dump_fn is not None else self.dump_funcs[str](v)
~~~~~~~^^^
File "/home/martin/code/Toml/toml-test-matrix/src/python-toml/toml/encoder.py", line 113, in _dump_str
v = [v[0] + joiner + v[1]] + v[2:]
~^^^
IndexError: list index out of range
Exit 1
want:
toml-test v2025-04-23 [./tests/encoding_test.py]: using embedded tests
encoder tests: 191 passed, 14 failed
took 2.4 1.20