toml-c version 3b138ce
FAIL invalid/array/extending-table
Expected an error, but no error was reported.
input sent to parser-cmd (PID 11924):
a = [{ b = 1 }]
# Cannot extend tables within static arrays
# https://github.com/toml-lang/toml/issues/908
[a.c]
foo = 1
output from parser-cmd (PID 11924) (stdout):
{
"a": [{
"b": {"type": "integer", "value": "1"},
"c": {
"foo": {"type": "integer", "value": "1"}
}
}]
}
want:
Exit code 1
FAIL invalid/control/bare-cr
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12026):
# The following line contains a single carriage return control character
output from parser-cmd (PID 12026) (stdout):
{}
want:
Exit code 1
FAIL invalid/control/bare-null
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12032):
bare-null = "some value"
output from parser-cmd (PID 12032) (stdout):
{
"bare-null": {"type": "string", "value": "some value"}
}
want:
Exit code 1
FAIL invalid/control/comment-null
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12046):
comment-null = "null" #
output from parser-cmd (PID 12046) (stdout):
{
"comment-null": {"type": "string", "value": "null"}
}
want:
Exit code 1
FAIL invalid/control/multi-cr
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12048):
multi-cr = """null
"""
output from parser-cmd (PID 12048) (stdout):
{
"multi-cr": {"type": "string", "value": "null\r"}
}
want:
Exit code 1
FAIL invalid/control/only-null
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12062):
output from parser-cmd (PID 12062) (stdout):
{}
want:
Exit code 1
FAIL invalid/control/rawmulti-cr
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12064):
rawmulti-cr = '''null
'''
output from parser-cmd (PID 12064) (stdout):
{
"rawmulti-cr": {"type": "string", "value": "null\r"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-codepoint
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12167):
# Invalid codepoint U+D800 : í €
output from parser-cmd (PID 12167) (stdout):
{}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-comment
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12171):
# Ã
output from parser-cmd (PID 12171) (stdout):
{}
want:
Exit code 1
FAIL invalid/encoding/utf16-comment
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12192):
# U T F - 1 6 w i t h o u t B O M
output from parser-cmd (PID 12192) (stdout):
{}
want:
Exit code 1
FAIL invalid/encoding/utf16-key
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12193):
k = " v "
output from parser-cmd (PID 12193) (stdout):
{}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12357):
a={}
# Inline tables are immutable and can't be extended
[a.b]
output from parser-cmd (PID 12357) (stdout):
{
"a": {
"b": {}
}
}
want:
Exit code 1
FAIL invalid/inline-table/trailing-comma
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12379):
# A terminating comma (also called trailing comma) is not permitted after the
# last key/value pair in an inline table
abc = { abc = 123, }
output from parser-cmd (PID 12379) (stdout):
{
"abc": {
"abc": {"type": "integer", "value": "123"}
}
}
want:
Exit code 1
FAIL invalid/table/append-with-dotted-keys-01
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12854):
# First a.b.c defines a table: a.b.c = {z=9}
#
# Then we define a.b.c.t = "str" to add a str to the above table, making it:
#
# a.b.c = {z=9, t="..."}
#
# While this makes sense, logically, it was decided this is not valid TOML as
# it's too confusing/convoluted.
#
# See: https://github.com/toml-lang/toml/issues/846
# https://github.com/toml-lang/toml/pull/859
[a.b.c]
z = 9
[a]
b.c.t = "Using dotted keys to add to [a.b.c] after explicitly defining it above is not allowed"
output from parser-cmd (PID 12854) (stdout):
{
"a": {
"b": {
"c": {
"z": {"type": "integer", "value": "9"},
"t": {
"type": "string",
"value": "Using dotted keys to add to [a.b.c] after explicitly defining it above is not allowed"
}
}
}
}
}
want:
Exit code 1
FAIL invalid/table/append-with-dotted-keys-02
Expected an error, but no error was reported.
input sent to parser-cmd (PID 12855):
# This is the same issue as in injection-1.toml, except that nests one level
# deeper. See that file for a more complete description.
[a.b.c.d]
z = 9
[a]
b.c.d.k.t = "Using dotted keys to add to [a.b.c.d] after explicitly defining it above is not allowed"
output from parser-cmd (PID 12855) (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
toml-test v2025-04-23 [./toml2json]: using embedded tests
valid tests: 205 passed, 0 failed
invalid tests: 514 passed, 15 failed
==> ENCODER TESTS
(not supported)
took 0.2 2.30