toml-rb version 28b2ebc
FAIL valid/array/array
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 5 at offset 6 (TomlRB::ParseError)
1987-07-05T17:45:00Z,
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 5 at offset 6 (Citrus::ParseError)
1987-07-05T17:45:00Z,
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
ints = [1, 2, 3, ]
floats = [1.1, 2.1, 3.1]
strings = ["a", "b", "c"]
dates = [
1987-07-05T17:45:00Z,
1979-05-27T07:32:00Z,
2006-06-01T11:00:00Z,
]
comments = [
1,
2, #this is ok
]
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 5 at offset 6 (TomlRB::ParseError)
1987-07-05T17:45:00Z,
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 5 at offset 6 (Citrus::ParseError)
1987-07-05T17:45:00Z,
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/array/mixed-int-array
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 1 at offset 23 (TomlRB::ParseError)
arrays-and-ints = [1, ["Arrays are not integers."]]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 1 at offset 23 (Citrus::ParseError)
arrays-and-ints = [1, ["Arrays are not integers."]]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
arrays-and-ints = [1, ["Arrays are not integers."]]
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 1 at offset 23 (TomlRB::ParseError)
arrays-and-ints = [1, ["Arrays are not integers."]]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 1 at offset 23 (Citrus::ParseError)
arrays-and-ints = [1, ["Arrays are not integers."]]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/array/mixed-int-float
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 1 at offset 23 (TomlRB::ParseError)
ints-and-floats = [1, 1.1]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 1 at offset 23 (Citrus::ParseError)
ints-and-floats = [1, 1.1]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
ints-and-floats = [1, 1.1]
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 1 at offset 23 (TomlRB::ParseError)
ints-and-floats = [1, 1.1]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 1 at offset 23 (Citrus::ParseError)
ints-and-floats = [1, 1.1]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/array/mixed-int-string
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 1 at offset 26 (TomlRB::ParseError)
strings-and-ints = ["hi", 42]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 1 at offset 26 (Citrus::ParseError)
strings-and-ints = ["hi", 42]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
strings-and-ints = ["hi", 42]
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 1 at offset 26 (TomlRB::ParseError)
strings-and-ints = ["hi", 42]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 1 at offset 26 (Citrus::ParseError)
strings-and-ints = ["hi", 42]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/array/mixed-string-table
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 3 at offset 2 (TomlRB::ParseError)
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 3 at offset 2 (Citrus::ParseError)
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
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 (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 3 at offset 2 (TomlRB::ParseError)
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 3 at offset 2 (Citrus::ParseError)
{ name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/array/nested-double
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 4 at offset 9 (TomlRB::ParseError)
[1, 2, [3]]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 4 at offset 9 (Citrus::ParseError)
[1, 2, [3]]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
nest = [
[
["a"],
[1, 2, [3]]
]
]
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 4 at offset 9 (TomlRB::ParseError)
[1, 2, [3]]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 4 at offset 9 (Citrus::ParseError)
[1, 2, [3]]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/comment/everywhere
Key "group.d" is not "date-local" but "datetime":
Expected: map[string]any{"type":"date-local", "value":"1979-05-27"}
Your encoder: map[string]any{"type":"datetime", "value":"1979-05-27T00:00:00+01:00"}
input sent to parser-cmd:
# Top comment.
# Top comment.
# Top comment.
# [no-extraneous-groups-please]
[group] # Comment
answer = 42 # Comment
# no-extraneous-keys-please = 999
# Inbetween comment.
more = [ # Comment
# What about multiple # comments?
# Can you handle it?
#
# Evil.
# Evil.
42, 42, # Comments within arrays are fun.
# What about multiple # comments?
# Can you handle it?
#
# Evil.
# Evil.
# ] Did I fool you?
] # Hopefully not.
# Make sure the space between the datetime and "#" isn't lexed.
dt = 1979-05-27T07:32:12-07:00 # c
d = 1979-05-27 # Comment
output from parser-cmd (stdout):
{
"group": {
"answer": {"type": "integer", "value": "42"},
"d": {"type": "datetime", "value": "1979-05-27T00:00:00+01:00"},
"dt": {"type": "datetime", "value": "1979-05-27T07:32:12-07:00"},
"more": [
{"type": "integer", "value": "42"},
{"type": "integer", "value": "42"}
]
}
}
want:
{
"group": {
"answer": {"type": "integer", "value": "42"},
"d": {"type": "date-local", "value": "1979-05-27"},
"dt": {"type": "datetime", "value": "1979-05-27T07:32:12-07:00"},
"more": [
{"type": "integer", "value": "42"},
{"type": "integer", "value": "42"}
]
}
}
FAIL valid/comment/tricky
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 22 at offset 5 (TomlRB::ParseError)
2#,9
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 22 at offset 5 (Citrus::ParseError)
2#,9
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
[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 (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 22 at offset 5 (TomlRB::ParseError)
2#,9
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 22 at offset 5 (Citrus::ParseError)
2#,9
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/datetime/datetime
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 4 at offset 21 (TomlRB::ParseError)
lower = 1987-07-05t17:45:00z
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 4 at offset 21 (Citrus::ParseError)
lower = 1987-07-05t17:45:00z
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
space = 1987-07-05 17:45:00Z
# ABNF is case-insensitive, both "Z" and "z" must be supported.
lower = 1987-07-05t17:45:00z
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 4 at offset 21 (TomlRB::ParseError)
lower = 1987-07-05t17:45:00z
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 4 at offset 21 (Citrus::ParseError)
lower = 1987-07-05t17:45:00z
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/datetime/edge
Key "first-date" is not "date-local" but "datetime":
Expected: map[string]any{"type":"date-local", "value":"0001-01-01"}
Your encoder: map[string]any{"type":"datetime", "value":"0001-01-01T00:00:00-00:25"}
input sent to parser-cmd:
first-offset = 0001-01-01 00:00:00Z
first-local = 0001-01-01 00:00:00
first-date = 0001-01-01
last-offset = 9999-12-31 23:59:59Z
last-local = 9999-12-31 23:59:59
last-date = 9999-12-31
output from parser-cmd (stdout):
{
"first-date": {"type": "datetime", "value": "0001-01-01T00:00:00-00:25"},
"first-local": {"type": "datetime", "value": "0001-01-01T00:00:00-00:25"},
"first-offset": {"type": "datetime", "value": "0001-01-01T00:00:00Z"},
"last-date": {"type": "datetime", "value": "9999-12-31T00:00:00Z"},
"last-local": {"type": "datetime", "value": "9999-12-31T23:59:59Z"},
"last-offset": {"type": "datetime", "value": "9999-12-31T23:59:59Z"}
}
want:
{
"first-date": {"type": "date-local", "value": "0001-01-01"},
"first-local": {"type": "datetime-local", "value": "0001-01-01T00:00:00"},
"first-offset": {"type": "datetime", "value": "0001-01-01T00:00:00Z"},
"last-date": {"type": "date-local", "value": "9999-12-31"},
"last-local": {"type": "datetime-local", "value": "9999-12-31T23:59:59"},
"last-offset": {"type": "datetime", "value": "9999-12-31T23:59:59Z"}
}
FAIL valid/datetime/leap-year
Key "2000-date" is not "date-local" but "datetime":
Expected: map[string]any{"type":"date-local", "value":"2000-02-29"}
Your encoder: map[string]any{"type":"datetime", "value":"2000-02-29T00:00:00Z"}
input sent to parser-cmd:
2000-datetime = 2000-02-29 15:15:15Z
2000-datetime-local = 2000-02-29 15:15:15
2000-date = 2000-02-29
2024-datetime = 2024-02-29 15:15:15Z
2024-datetime-local = 2024-02-29 15:15:15
2024-date = 2024-02-29
output from parser-cmd (stdout):
{
"2000-date": {"type": "datetime", "value": "2000-02-29T00:00:00Z"},
"2000-datetime": {"type": "datetime", "value": "2000-02-29T15:15:15Z"},
"2000-datetime-local": {"type": "datetime", "value": "2000-02-29T15:15:15Z"},
"2024-date": {"type": "datetime", "value": "2024-02-29T00:00:00Z"},
"2024-datetime": {"type": "datetime", "value": "2024-02-29T15:15:15Z"},
"2024-datetime-local": {"type": "datetime", "value": "2024-02-29T15:15:15Z"}
}
want:
{
"2000-date": {"type": "date-local", "value": "2000-02-29"},
"2000-datetime": {"type": "datetime", "value": "2000-02-29T15:15:15Z"},
"2000-datetime-local": {"type": "datetime-local", "value": "2000-02-29T15:15:15"},
"2024-date": {"type": "date-local", "value": "2024-02-29"},
"2024-datetime": {"type": "datetime", "value": "2024-02-29T15:15:15Z"},
"2024-datetime-local": {"type": "datetime-local", "value": "2024-02-29T15:15:15"}
}
FAIL valid/datetime/local
Key "local" is not "datetime-local" but "datetime":
Expected: map[string]any{"type":"datetime-local", "value":"1987-07-05T17:45:00"}
Your encoder: map[string]any{"type":"datetime", "value":"1987-07-05T17:45:00+01:00"}
input sent to parser-cmd:
local = 1987-07-05T17:45:00
milli = 1977-12-21T10:32:00.555
space = 1987-07-05 17:45:00
output from parser-cmd (stdout):
{
"local": {"type": "datetime", "value": "1987-07-05T17:45:00+01:00"},
"milli": {"type": "datetime", "value": "1977-12-21T10:32:00.5550Z"},
"space": {"type": "datetime", "value": "1987-07-05T17:45:00+01:00"}
}
want:
{
"local": {"type": "datetime-local", "value": "1987-07-05T17:45:00"},
"milli": {"type": "datetime-local", "value": "1977-12-21T10:32:00.555"},
"space": {"type": "datetime-local", "value": "1987-07-05T17:45:00"}
}
FAIL valid/datetime/local-date
Key "bestdayever" is not "date-local" but "datetime":
Expected: map[string]any{"type":"date-local", "value":"1987-07-05"}
Your encoder: map[string]any{"type":"datetime", "value":"1987-07-05T00:00:00+01:00"}
input sent to parser-cmd:
bestdayever = 1987-07-05
output from parser-cmd (stdout):
{
"bestdayever": {"type": "datetime", "value": "1987-07-05T00:00:00+01:00"}
}
want:
{
"bestdayever": {"type": "date-local", "value": "1987-07-05"}
}
FAIL valid/datetime/local-time
Key "besttimeever" is not "time-local" but "datetime":
Expected: map[string]any{"type":"time-local", "value":"17:45:00"}
Your encoder: map[string]any{"type":"datetime", "value":"1970-01-01T18:45:00+01:00"}
input sent to parser-cmd:
besttimeever = 17:45:00
milliseconds = 10:32:00.555
output from parser-cmd (stdout):
{
"besttimeever": {"type": "datetime", "value": "1970-01-01T18:45:00+01:00"},
"milliseconds": {"type": "datetime", "value": "1970-01-01T11:32:00.5550+01:00"}
}
want:
{
"besttimeever": {"type": "time-local", "value": "17:45:00"},
"milliseconds": {"type": "time-local", "value": "10:32:00.555"}
}
FAIL valid/inline-table/key-dotted-2
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:15:in `block (2 levels) in value': Key "a" is defined more than once (TomlRB::ValueOverwriteError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:15:in `merge!'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:15:in `block in value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:13:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:13:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:8:in `accept_visitor'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:48:in `visit_value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:17:in `assign'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:36:in `visit_keyvalue'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:40:in `accept_visitor'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `block in initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
many.dots.here.dot.dot.dot = {a.b.c = 1, a.b.d = 2}
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:15:in `block (2 levels) in value': Key "a" is defined more than once (TomlRB::ValueOverwriteError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:15:in `merge!'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:15:in `block in value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:13:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:13:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/inline_table.rb:8:in `accept_visitor'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:48:in `visit_value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:17:in `assign'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:36:in `visit_keyvalue'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:40:in `accept_visitor'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `block in initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/inline-table/key-dotted-5
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 2 at offset 16 (TomlRB::ParseError)
arr-2 = ["str", {a.b = 1}]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 2 at offset 16 (Citrus::ParseError)
arr-2 = ["str", {a.b = 1}]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
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 (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 2 at offset 16 (TomlRB::ParseError)
arr-2 = ["str", {a.b = 1}]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 2 at offset 16 (Citrus::ParseError)
arr-2 = ["str", {a.b = 1}]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/spec/array-0
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 8 at offset 28 (TomlRB::ParseError)
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 8 at offset 28 (Citrus::ParseError)
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
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 (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 8 at offset 28 (TomlRB::ParseError)
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 8 at offset 28 (Citrus::ParseError)
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/spec/local-date-0
Key "ld1" is not "date-local" but "datetime":
Expected: map[string]any{"type":"date-local", "value":"1979-05-27"}
Your encoder: map[string]any{"type":"datetime", "value":"1979-05-27T00:00:00+01:00"}
input sent to parser-cmd:
ld1 = 1979-05-27
output from parser-cmd (stdout):
{
"ld1": {"type": "datetime", "value": "1979-05-27T00:00:00+01:00"}
}
want:
{
"ld1": {"type": "date-local", "value": "1979-05-27"}
}
FAIL valid/spec/local-date-time-0
Key "ldt1" is not "datetime-local" but "datetime":
Expected: map[string]any{"type":"datetime-local", "value":"1979-05-27T07:32:00"}
Your encoder: map[string]any{"type":"datetime", "value":"1979-05-27T07:32:00+01:00"}
input sent to parser-cmd:
ldt1 = 1979-05-27T07:32:00
ldt2 = 1979-05-27T00:32:00.999
output from parser-cmd (stdout):
{
"ldt1": {"type": "datetime", "value": "1979-05-27T07:32:00+01:00"},
"ldt2": {"type": "datetime", "value": "1979-05-27T00:32:00.9990+01:00"}
}
want:
{
"ldt1": {"type": "datetime-local", "value": "1979-05-27T07:32:00"},
"ldt2": {"type": "datetime-local", "value": "1979-05-27T00:32:00.999"}
}
FAIL valid/spec/local-time-0
Key "lt1" is not "time-local" but "datetime":
Expected: map[string]any{"type":"time-local", "value":"07:32:00"}
Your encoder: map[string]any{"type":"datetime", "value":"1970-01-01T08:32:00+01:00"}
input sent to parser-cmd:
lt1 = 07:32:00
lt2 = 00:32:00.999
output from parser-cmd (stdout):
{
"lt1": {"type": "datetime", "value": "1970-01-01T08:32:00+01:00"},
"lt2": {"type": "datetime", "value": "1970-01-01T01:32:00.9990+01:00"}
}
want:
{
"lt1": {"type": "time-local", "value": "07:32:00"},
"lt2": {"type": "time-local", "value": "00:32:00.999"}
}
FAIL valid/spec/string-4
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 4 at offset 50 (TomlRB::ParseError)
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 4 at offset 50 (Citrus::ParseError)
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
str4 = """Here are two quotation marks: "". Simple enough."""
# str5 = """Here are three quotation marks: """.""" # INVALID
str5 = """Here are three quotation marks: ""\"."""
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
# "This," she said, "is just a pointless statement."
str7 = """"This," she said, "is just a pointless statement.""""
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 4 at offset 50 (TomlRB::ParseError)
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 4 at offset 50 (Citrus::ParseError)
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/spec/table-7
Key "owner.member_since" is not "date-local" but "datetime":
Expected: map[string]any{"type":"date-local", "value":"1999-08-04"}
Your encoder: map[string]any{"type":"datetime", "value":"1999-08-04T00:00:00+01:00"}
input sent to parser-cmd:
# Top-level table begins.
name = "Fido"
breed = "pug"
# Top-level table ends.
[owner]
name = "Regina Dogman"
member_since = 1999-08-04
output from parser-cmd (stdout):
{
"breed": {"type": "string", "value": "pug"},
"name": {"type": "string", "value": "Fido"},
"owner": {
"member_since": {"type": "datetime", "value": "1999-08-04T00:00:00+01:00"},
"name": {"type": "string", "value": "Regina Dogman"}
}
}
want:
{
"breed": {"type": "string", "value": "pug"},
"name": {"type": "string", "value": "Fido"},
"owner": {
"member_since": {"type": "date-local", "value": "1999-08-04"},
"name": {"type": "string", "value": "Regina Dogman"}
}
}
FAIL valid/string/ends-in-whitespace-escape
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:38:in `parse_error': Escape sequence \ is reserved (TomlRB::ParseError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:30:in `block in transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `gsub'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:56:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:55:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `map'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
beee = """
heeee
geeee\
"""
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:38:in `parse_error': Escape sequence \ is reserved (TomlRB::ParseError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:30:in `block in transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `gsub'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:56:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:55:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `map'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/string/escape-tricky
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 10 at offset 45 (TomlRB::ParseError)
multiline_end_esc = """When will it end? \"""...""\" should be here\""""
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 10 at offset 45 (Citrus::ParseError)
multiline_end_esc = """When will it end? \"""...""\" should be here\""""
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
end_esc = "String does not end here\" but ends here\\"
lit_end_esc = 'String ends here\'
multiline_unicode = """
\u00a0"""
multiline_not_unicode = """
\\u0041"""
multiline_end_esc = """When will it end? \"""...""\" should be here\""""
lit_multiline_not_unicode = '''
\u007f'''
lit_multiline_end = '''There is no escape\'''
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:16:in `rescue in initialize': Failed to parse input on line 10 at offset 45 (TomlRB::ParseError)
multiline_end_esc = """When will it end? \"""...""\" should be here\""""
^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
/home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:669:in `parse': Failed to parse input on line 10 at offset 45 (Citrus::ParseError)
multiline_end_esc = """When will it end? \"""...""\" should be here\""""
^
from /home/martin/.cache/gem/ruby/3.2.0/gems/citrus-3.0.2/lib/citrus.rb:392:in `parse'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:13:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/string/multiline
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:38:in `parse_error': Escape sequence \ is reserved (TomlRB::ParseError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:30:in `block in transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `gsub'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:56:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:55:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `map'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
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 (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:38:in `parse_error': Escape sequence \ is reserved (TomlRB::ParseError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:30:in `block in transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `gsub'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:56:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:55:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `map'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/string/multiline-empty
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:38:in `parse_error': Escape sequence \ is reserved (TomlRB::ParseError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:30:in `block in transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `gsub'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:56:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:55:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `map'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
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 (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:38:in `parse_error': Escape sequence \ is reserved (TomlRB::ParseError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:30:in `block in transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `gsub'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:28:in `transform_escaped_chars'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/string.rb:56:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/keyvalue.rb:55:in `value'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `map'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
FAIL valid/table/names
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/table.rb:33:in `ensure_key_not_defined': Key "a.b.c" is defined more than once (TomlRB::ValueOverwriteError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/table.rb:8:in `navigate_keys'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:32:in `visit_table'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/table.rb:22:in `accept_visitor'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `block in initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
input sent to parser-cmd:
[a.b.c]
[a."b.c"]
[a.'d.e']
[a.' x ']
[ d.e.f ]
[ g . h . i ]
[ j . "ʞ" . 'l' ]
[x.1.2]
output from parser-cmd (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/table.rb:33:in `ensure_key_not_defined': Key "a.b.c" is defined more than once (TomlRB::ValueOverwriteError)
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/table.rb:8:in `navigate_keys'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:32:in `visit_table'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/table.rb:22:in `accept_visitor'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `block in initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/parser.rb:14:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:47:in `parse'
from ./src/ruby-toml-rb/ruby-toml-rb-decoder:38:in `'
Exit 1
want:
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/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/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/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):
{
"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\u0010"}
}
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\u0000"}
}
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\u001f"}
}
want:
Exit code 1
FAIL invalid/control/rawmulti-cd
Expected an error, but no error was reported.
input sent to parser-cmd:
rawmulti-cd = '''null
'''
output from parser-cmd (stdout):
{
"rawmulti-cd": {"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\u0010"}
}
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\u0000"}
}
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\u001f"}
}
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\u0010"}
}
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\u0000"}
}
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\u001f"}
}
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\u0010"}
}
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\u0000"}
}
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\u001f"}
}
want:
Exit code 1
FAIL invalid/datetime/feb-29
Expected an error, but no error was reported.
input sent to parser-cmd:
"not a leap year" = 2100-02-29T15:15:15Z
output from parser-cmd (stdout):
{
"not a leap year": {"type": "datetime", "value": "2100-03-01T15:15:15Z"}
}
want:
Exit code 1
FAIL invalid/datetime/feb-30
Expected an error, but no error was reported.
input sent to parser-cmd:
"only 28 or 29 days in february" = 1988-02-30T15:15:15Z
output from parser-cmd (stdout):
{
"only 28 or 29 days in february": {"type": "datetime", "value": "1988-03-01T15:15:15Z"}
}
want:
Exit code 1
FAIL invalid/datetime/hour-over
Expected an error, but no error was reported.
input sent to parser-cmd:
# time-hour = 2DIGIT ; 00-23
d = 2006-01-01T24:00:00-00:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "2006-01-02T00:00:00Z"}
}
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": "1"}
}
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": "1"}
}
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": "1.0e+23"}
}
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": "1"}
}
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": "1.2"}
}
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": "0"}
}
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/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": "1"}
}
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": "1.2"}
}
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"}
}
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"}
}
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-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/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": "1"}
}
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": "0"}
}
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/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": "0"}
}
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": "0"}
}
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": "0"}
}
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/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/local-date/feb-29
Expected an error, but no error was reported.
input sent to parser-cmd:
"not a leap year" = 2100-02-29
output from parser-cmd (stdout):
{
"not a leap year": {"type": "datetime", "value": "2100-03-01T00:00:00Z"}
}
want:
Exit code 1
FAIL invalid/local-date/feb-30
Expected an error, but no error was reported.
input sent to parser-cmd:
"only 28 or 29 days in february" = 1988-02-30
output from parser-cmd (stdout):
{
"only 28 or 29 days in february": {"type": "datetime", "value": "1988-03-01T00:00:00Z"}
}
want:
Exit code 1
FAIL invalid/local-datetime/feb-29
Expected an error, but no error was reported.
input sent to parser-cmd:
"not a leap year" = 2100-02-29T15:15:15
output from parser-cmd (stdout):
{
"not a leap year": {"type": "datetime", "value": "2100-03-01T15:15:15Z"}
}
want:
Exit code 1
FAIL invalid/local-datetime/feb-30
Expected an error, but no error was reported.
input sent to parser-cmd:
"only 28 or 29 days in february" = 1988-02-30T15:15:15
output from parser-cmd (stdout):
{
"only 28 or 29 days in february": {"type": "datetime", "value": "1988-03-01T15:15:15Z"}
}
want:
Exit code 1
FAIL invalid/local-datetime/hour-over
Expected an error, but no error was reported.
input sent to parser-cmd:
# time-hour = 2DIGIT ; 00-23
d = 2006-01-01T24:00:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "2006-01-02T00:00:00Z"}
}
want:
Exit code 1
FAIL invalid/local-time/hour-over
Expected an error, but no error was reported.
input sent to parser-cmd:
# time-hour = 2DIGIT ; 00-23
d = 24:00:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "1970-01-02T01:00:00+01:00"}
}
want:
Exit code 1
FAIL invalid/local-time/minute-over
Expected an error, but no error was reported.
input sent to parser-cmd:
# time-minute = 2DIGIT ; 00-59
d = 00:60:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "1970-01-01T02:00:00+01:00"}
}
want:
Exit code 1
FAIL invalid/local-time/second-over
Expected an error, but no error was reported.
input sent to parser-cmd:
# time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second
# ; rules
d = 00:00:61
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "1970-01-01T01:01:01+01:00"}
}
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-escape-3
Expected an error, but no error was reported.
input sent to parser-cmd:
backslash = "\"
output from parser-cmd (stdout):
{
"backslash": {"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/multiline-bad-escape-4
Expected an error, but no error was reported.
input sent to parser-cmd:
backslash = """\"""
output from parser-cmd (stdout):
{
"backslash": {"type": "string", "value": "\\"}
}
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/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/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/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
toml-test v2024-05-31 [./src/ruby-toml-rb/ruby-toml-rb-decoder]: using embedded tests
valid tests: 155 passed, 27 failed
invalid tests: 281 passed, 90 failed
==> ENCODER TESTS
FAIL valid/array/array
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:9:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:9:in `map'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:9:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"comments": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
"dates": [
{"type": "datetime", "value": "1987-07-05T17:45:00Z"},
{"type": "datetime", "value": "1979-05-27T07:32:00Z"},
{"type": "datetime", "value": "2006-06-01T11:00:00Z"}
],
"floats": [
{"type": "float", "value": "1.1"},
{"type": "float", "value": "2.1"},
{"type": "float", "value": "3.1"}
],
"ints": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"},
{"type": "integer", "value": "3"}
],
"strings": [
{"type": "string", "value": "a"},
{"type": "string", "value": "b"},
{"type": "string", "value": "c"}
]
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:9:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:9:in `map'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:9:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/array/mixed-string-table
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:32:in `sort_pairs': undefined method `keys' for "b":String (NoMethodError)
hash.keys.sort.each do |key|
^^^^^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:77:in `block (2 levels) in dump_table_array_pairs'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:75:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:75:in `block in dump_table_array_pairs'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:71:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:71:in `dump_table_array_pairs'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:52:in `dump_pairs'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:24:in `visit'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:98:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:98:in `dump'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"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 (stderr):
/home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:32:in `sort_pairs': undefined method `keys' for "b":String (NoMethodError)
hash.keys.sort.each do |key|
^^^^^
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:77:in `block (2 levels) in dump_table_array_pairs'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:75:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:75:in `block in dump_table_array_pairs'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:71:in `each'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:71:in `dump_table_array_pairs'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:52:in `dump_pairs'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:24:in `visit'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb/dumper.rb:12:in `initialize'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:98:in `new'
from /home/martin/code/Toml/toml-test-matrix/src/ruby-toml-rb/lib/toml-rb.rb:98:in `dump'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/comment/after-literal-no-ws
decode TOML from encoder:
toml: line 2 (last key "inf"): expected value but found "Infinity" instead
input sent to parser-cmd:
{
"false": {"type": "bool", "value": "false"},
"inf": {"type": "float", "value": "inf"},
"nan": {"type": "float", "value": "nan"},
"true": {"type": "bool", "value": "true"}
}
output from parser-cmd (stdout):
false = false
inf = Infinity
nan = NaN
true = true
want:
inf=inf#infinity
nan=nan#not a number
true=true#true
false=false#false
FAIL valid/comment/everywhere
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"group": {
"answer": {"type": "integer", "value": "42"},
"d": {"type": "date-local", "value": "1979-05-27"},
"dt": {"type": "datetime", "value": "1979-05-27T07:32:12-07:00"},
"more": [
{"type": "integer", "value": "42"},
{"type": "integer", "value": "42"}
]
}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/datetime/datetime
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"lower": {"type": "datetime", "value": "1987-07-05T17:45:00Z"},
"space": {"type": "datetime", "value": "1987-07-05T17:45:00Z"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/datetime/edge
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"first-date": {"type": "date-local", "value": "0001-01-01"},
"first-local": {"type": "datetime-local", "value": "0001-01-01T00:00:00"},
"first-offset": {"type": "datetime", "value": "0001-01-01T00:00:00Z"},
"last-date": {"type": "date-local", "value": "9999-12-31"},
"last-local": {"type": "datetime-local", "value": "9999-12-31T23:59:59"},
"last-offset": {"type": "datetime", "value": "9999-12-31T23:59:59Z"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/datetime/leap-year
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"2000-date": {"type": "date-local", "value": "2000-02-29"},
"2000-datetime": {"type": "datetime", "value": "2000-02-29T15:15:15Z"},
"2000-datetime-local": {"type": "datetime-local", "value": "2000-02-29T15:15:15"},
"2024-date": {"type": "date-local", "value": "2024-02-29"},
"2024-datetime": {"type": "datetime", "value": "2024-02-29T15:15:15Z"},
"2024-datetime-local": {"type": "datetime-local", "value": "2024-02-29T15:15:15"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/datetime/local
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "datetime-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"local": {"type": "datetime-local", "value": "1987-07-05T17:45:00"},
"milli": {"type": "datetime-local", "value": "1977-12-21T10:32:00.555"},
"space": {"type": "datetime-local", "value": "1987-07-05T17:45:00"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "datetime-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/datetime/local-date
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"bestdayever": {"type": "date-local", "value": "1987-07-05"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/datetime/local-time
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "time-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"besttimeever": {"type": "time-local", "value": "17:45:00"},
"milliseconds": {"type": "time-local", "value": "10:32:00.555"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "time-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/datetime/milliseconds
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"utc1": {"type": "datetime", "value": "1987-07-05T17:45:56.123Z"},
"utc2": {"type": "datetime", "value": "1987-07-05T17:45:56.600Z"},
"wita1": {"type": "datetime", "value": "1987-07-05T17:45:56.123+08:00"},
"wita2": {"type": "datetime", "value": "1987-07-05T17:45:56.600+08:00"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/datetime/timezone
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"nzdt": {"type": "datetime", "value": "1987-07-05T17:45:56+13:00"},
"nzst": {"type": "datetime", "value": "1987-07-05T17:45:56+12:00"},
"pdt": {"type": "datetime", "value": "1987-07-05T17:45:56-05:00"},
"utc": {"type": "datetime", "value": "1987-07-05T17:45:56Z"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/example
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"best-day-ever": {"type": "datetime", "value": "1987-07-05T17:45:00Z"},
"numtheory": {
"boring": {"type": "bool", "value": "false"},
"perfection": [
{"type": "integer", "value": "6"},
{"type": "integer", "value": "28"},
{"type": "integer", "value": "496"}
]
}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/float/inf-and-nan
decode TOML from encoder:
toml: line 1 (last key "infinity"): expected value but found "Infinity" instead
input sent to parser-cmd:
{
"infinity": {"type": "float", "value": "inf"},
"infinity_neg": {"type": "float", "value": "-inf"},
"infinity_plus": {"type": "float", "value": "inf"},
"nan": {"type": "float", "value": "nan"},
"nan_neg": {"type": "float", "value": "nan"},
"nan_plus": {"type": "float", "value": "nan"}
}
output from parser-cmd (stdout):
infinity = Infinity
infinity_neg = -Infinity
infinity_plus = Infinity
nan = NaN
nan_neg = NaN
nan_plus = NaN
want:
# We don't encode +nan and -nan back with the signs; many languages don't
# support a sign on NaN (it doesn't really make much sense).
nan = nan
nan_neg = -nan
nan_plus = +nan
infinity = inf
infinity_neg = -inf
infinity_plus = +inf
FAIL valid/inline-table/key-dotted-5
decode TOML from encoder:
toml: line 1 (last key "arr-2.a"): expected value but found '>' instead
input sent to parser-cmd:
{
"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 (stdout):
arr-2 = ["str", {"a"=>{"b"=>1}}]
arr-4 = ["str", {"a"=>{"b"=>1}}, {"a"=>{"b"=>2}}]
[[arr-1]]
[arr-1.a]
b = 1
[[arr-3]]
[arr-3.a]
b = 1
[[arr-3]]
[arr-3.a]
b = 2
want:
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}]
FAIL valid/inline-table/nest
decode TOML from encoder:
toml: line 2 (last key "arr_arr_tbl_val.one"): expected value but found '>' instead
input sent to parser-cmd:
{
"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 (stdout):
arr_arr_tbl_empty = [[{}]]
arr_arr_tbl_val = [[{"one"=>1}]]
arr_arr_tbls = [[{"one"=>1}, {"two"=>2}]]
[[tbl_arr_tbl.arr_tbl]]
one = 1
[tbl_tbl_empty.tbl_0]
[tbl_tbl_val.tbl_1]
one = 1
[[arr_tbl_tbl]]
[arr_tbl_tbl.tbl]
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/quoted-unicode
decode TOML from encoder:
toml: line 2: expected four hexadecimal digits after '\u', but got "\\b \\f A \\u007F \\u0080 ÿ \\uD7FF \ue000 \\uFFFF 𐀀 \\u{" instead
input sent to parser-cmd:
{
"\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 (stdout):
"\u0000" = "null"
"\b \f A \u007F \u0080 ÿ \uD7FF \uFFFF 𐀀 \u{10FFFF}" = "escaped key"
"\\u0000" = "different key"
"l ~ \u0080 ÿ \uD7FF \uFFFF 𐀀 \u{10FFFF}" = "literal key"
"~ \u0080 ÿ \uD7FF \uFFFF 𐀀 \u{10FFFF}" = "basic key"
want:
"\u0000" = "null"
'\u0000' = "different key"
"\u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff" = "escaped key"
"~ ÿ 𐀀 " = "basic key"
'l ~ ÿ 𐀀 ' = "literal key"
FAIL valid/spec-example-1
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"title": {"type": "string", "value": "TOML Example"},
"clients": {
"data": [
[
{"type": "string", "value": "gamma"},
{"type": "string", "value": "delta"}
],
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
],
"hosts": [
{"type": "string", "value": "alpha"},
{"type": "string", "value": "omega"}
]
},
"database": {
"connection_max": {"type": "integer", "value": "5000"},
"enabled": {"type": "bool", "value": "true"},
"server": {"type": "string", "value": "192.168.1.1"},
"ports": [
{"type": "integer", "value": "8001"},
{"type": "integer", "value": "8001"},
{"type": "integer", "value": "8002"}
]
},
"owner": {
"dob": {"type": "datetime", "value": "1979-05-27T07:32:00-08:00"},
"name": {"type": "string", "value": "Lance Uppercut"}
},
"servers": {
"alpha": {
"dc": {"type": "string", "value": "eqdc10"},
"ip": {"type": "string", "value": "10.0.0.1"}
},
"beta": {
"dc": {"type": "string", "value": "eqdc10"},
"ip": {"type": "string", "value": "10.0.0.2"}
}
}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/spec-example-1-compact
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"title": {"type": "string", "value": "TOML Example"},
"clients": {
"data": [
[
{"type": "string", "value": "gamma"},
{"type": "string", "value": "delta"}
],
[
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
]
],
"hosts": [
{"type": "string", "value": "alpha"},
{"type": "string", "value": "omega"}
]
},
"database": {
"connection_max": {"type": "integer", "value": "5000"},
"enabled": {"type": "bool", "value": "true"},
"server": {"type": "string", "value": "192.168.1.1"},
"ports": [
{"type": "integer", "value": "8001"},
{"type": "integer", "value": "8001"},
{"type": "integer", "value": "8002"}
]
},
"owner": {
"dob": {"type": "datetime", "value": "1979-05-27T07:32:00-08:00"},
"name": {"type": "string", "value": "Lance Uppercut"}
},
"servers": {
"alpha": {
"dc": {"type": "string", "value": "eqdc10"},
"ip": {"type": "string", "value": "10.0.0.1"}
},
"beta": {
"dc": {"type": "string", "value": "eqdc10"},
"ip": {"type": "string", "value": "10.0.0.2"}
}
}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/spec/array-0
decode TOML from encoder:
toml: line 2 (last key "contributors.email"): expected value but found '>' instead
input sent to parser-cmd:
{
"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 (stdout):
colors = ["red", "yellow", "green"]
contributors = ["Foo Bar ", {"email"=>"bazqux@example.com", "name"=>"Baz Qux", "url"=>"https://example.com/bazqux"}]
integers = [1, 2, 3]
nested_arrays_of_ints = [[1, 2], [3, 4, 5]]
nested_mixed_array = [[1, 2], ["a", "b", "c"]]
numbers = [0.1, 0.2, 0.5, 1, 2, 5]
string_array = ["all", "strings", "are the same", "type"]
want:
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" }
]
FAIL valid/spec/float-2
decode TOML from encoder:
toml: line 1 (last key "sf1"): expected value but found "Infinity" instead
input sent to parser-cmd:
{
"sf1": {"type": "float", "value": "inf"},
"sf2": {"type": "float", "value": "inf"},
"sf3": {"type": "float", "value": "-inf"},
"sf4": {"type": "float", "value": "nan"},
"sf5": {"type": "float", "value": "nan"},
"sf6": {"type": "float", "value": "nan"}
}
output from parser-cmd (stdout):
sf1 = Infinity
sf2 = Infinity
sf3 = -Infinity
sf4 = NaN
sf5 = NaN
sf6 = NaN
want:
# infinity
sf1 = inf # positive infinity
sf2 = +inf # positive infinity
sf3 = -inf # negative infinity
# not a number
sf4 = nan # actual sNaN/qNaN encoding is implementation-specific
sf5 = +nan # same as `nan`
sf6 = -nan # valid, actual encoding is implementation-specific
FAIL valid/spec/local-date-0
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"ld1": {"type": "date-local", "value": "1979-05-27"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/spec/local-date-time-0
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "datetime-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"ldt1": {"type": "datetime-local", "value": "1979-05-27T07:32:00"},
"ldt2": {"type": "datetime-local", "value": "1979-05-27T00:32:00.999"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "datetime-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/spec/local-time-0
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "time-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"lt1": {"type": "time-local", "value": "07:32:00"},
"lt2": {"type": "time-local", "value": "00:32:00.999"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "time-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/spec/offset-date-time-0
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"odt1": {"type": "datetime", "value": "1979-05-27T07:32:00Z"},
"odt2": {"type": "datetime", "value": "1979-05-27T00:32:00-07:00"},
"odt3": {"type": "datetime", "value": "1979-05-27T00:32:00.999-07:00"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/spec/offset-date-time-1
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"odt4": {"type": "datetime", "value": "1979-05-27T07:32:00Z"}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:24:in `convert': undefined method `iso8601' for Time:Class (NoMethodError)
when "datetime" then Time.iso8601(val)
^^^^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/spec/table-7
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
input sent to parser-cmd:
{
"breed": {"type": "string", "value": "pug"},
"name": {"type": "string", "value": "Fido"},
"owner": {
"member_since": {"type": "date-local", "value": "1999-08-04"},
"name": {"type": "string", "value": "Regina Dogman"}
}
}
output from parser-cmd (stderr):
./src/ruby-toml-rb/ruby-toml-rb-encoder:10:in `convert': undefined method `key?' for "date-local":String (NoMethodError)
if json.key?("type")
^^^^^
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:36:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `block in convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `to_h'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:39:in `convert'
from ./src/ruby-toml-rb/ruby-toml-rb-encoder:43:in `'
Exit 1
want:
FAIL valid/string/quoted-unicode
decode TOML from encoder:
toml: line 1 (last key "basic_string"): expected four hexadecimal digits after '\u', but got "~ \\u0080 ÿ \\uD7FF \ue000 \\uFFFF 𐀀 \\u{" instead
input sent to parser-cmd:
{
"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 (stdout):
basic_string = "~ \u0080 ÿ \uD7FF \uFFFF 𐀀 \u{10FFFF}"
escaped_string = "\u0000 \b \f A \u007F \u0080 ÿ \uD7FF \uFFFF 𐀀 \u{10FFFF}"
literal_string = "~ \u0080 ÿ \uD7FF \uFFFF 𐀀 \u{10FFFF}"
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 = '~ ÿ 𐀀 '
toml-test v2024-05-31 [./src/ruby-toml-rb/ruby-toml-rb-encoder]: using embedded tests
encoder tests: 154 passed, 28 failed
took 0.0 0.0