toml-f version 59a62ce
FAIL valid/key/escapes
error: Invalid character in key
--> stdin:1:1-4
|
1 | "\n" = "newline"
| ^^^^ key cannot contain newline
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
input sent to parser-cmd:
"\n" = "newline"
"\b" = "bell"
"\u00c0" = "latin capital letter A with grave"
"\"" = "just a quote"
["backsp\b\b"]
["\"quoted\""]
quote = true
["a.b"."\u00c0"]
output from parser-cmd (stderr):
error: Invalid character in key
--> stdin:1:1-4
|
1 | "\n" = "newline"
| ^^^^ key cannot contain newline
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
want:
FAIL valid/key/quoted-unicode
error: Invalid syntax
--> stdin:2:1-8
|
2 | "\u0000" = "null"
| ^^^^^^^^ unexpected invalid sequence
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
input sent to parser-cmd:
"\u0000" = "null"
'\u0000' = "different key"
"\u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff" = "escaped key"
"~ ÿ 𐀀 " = "basic key"
'l ~ ÿ 𐀀 ' = "literal key"
output from parser-cmd (stderr):
error: Invalid syntax
--> stdin:2:1-8
|
2 | "\u0000" = "null"
| ^^^^^^^^ unexpected invalid sequence
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
want:
FAIL valid/spec/string-0
Values for key "str" don't match:
Expected: I'm a string. "You can quote me". Name José
Location SF.
Your encoder: I'm a string. "You can quote me". Name JosénLocation SF.
input sent to parser-cmd:
str = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
output from parser-cmd (stdout):
{
"str": {"type": "string", "value": "I'm a string. \"You can quote me\". Name\tJosénLocation\tSF."}
}
want:
{
"str": {"type": "string", "value": "I'm a string. \"You can quote me\". Name\tJosé\nLocation\tSF."}
}
FAIL valid/spec/string-3
Values for key "str2" don't match:
Expected: The quick brown fox jumps over the lazy dog.
Your encoder: The quick brown
fox jumps over the lazy dog.
input sent to parser-cmd:
# The following strings are byte-for-byte equivalent:
str1 = "The quick brown fox jumps over the lazy dog."
str2 = """
The quick brown \
fox jumps over \
the lazy dog."""
str3 = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
output from parser-cmd (stdout):
{
"str1": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"str2": {"type": "string", "value": "The quick brown \n\n fox jumps over the lazy dog."},
"str3": {
"type": "string",
"value": " The quick brown fox jumps over the lazy dog. "
}
}
want:
{
"str1": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"str2": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"str3": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."}
}
FAIL valid/string/ends-in-whitespace-escape
Values for key "beee" don't match:
Expected: heeee
geeee
Your encoder: heeee
geeee
input sent to parser-cmd:
beee = """
heeee
geeee\
"""
output from parser-cmd (stdout):
{
"beee": {"type": "string", "value": "heeee\ngeeee\n\n "}
}
want:
{
"beee": {"type": "string", "value": "heeee\ngeeee"}
}
FAIL valid/string/escape-tricky
error: Invalid expression for value
--> stdin:4:21-33
|
4 | multiline_unicode = """
| ^^^^^^^^^^^^^ unexpected invalid sequence
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
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):
error: Invalid expression for value
--> stdin:4:21-33
|
4 | multiline_unicode = """
| ^^^^^^^^^^^^^ unexpected invalid sequence
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
want:
FAIL valid/string/escapes
decode JSON output from parser:
invalid character '\x1f' in string literal
input sent to parser-cmd:
backspace = "|\b."
tab = "|\t."
newline = "|\n."
formfeed = "|\f."
carriage = "|\r."
quote = "|\"."
backslash = "|\\."
delete = "|\u007F."
unitseparator = "|\u001F."
# \u is escaped, so should NOT be interperted as a \u escape.
notunicode1 = "|\\u."
notunicode2 = "|\u005Cu."
notunicode3 = "|\\u0075."
notunicode4 = "|\\\u0075."
output from parser-cmd (stdout):
{
"backspace": {"type": "string", "value": "|\b."},
"tab": {"type": "string", "value": "|\t."},
"newline": {"type": "string", "value": "|\n."},
"formfeed": {"type": "string", "value": "|\f."},
"carriage": {"type": "string", "value": "|\r."},
"quote": {"type": "string", "value": "|\"."},
"backslash": {"type": "string", "value": "|\\."},
"delete": {"type": "string", "value": "|"},
"unitseparator": {"type": "string", "value": "|"},
"notunicode1": {"type": "string", "value": "|\\u."},
"notunicode2": {"type": "string", "value": "|\\."},
"notunicode3": {"type": "string", "value": "|\\u0075."},
"notunicode4": {"type": "string", "value": "|\\u"}
}
want:
{
"backslash": {"type": "string", "value": "|\\."},
"backspace": {"type": "string", "value": "|\b."},
"carriage": {"type": "string", "value": "|\r."},
"delete": {"type": "string", "value": "|."},
"formfeed": {"type": "string", "value": "|\f."},
"newline": {"type": "string", "value": "|\n."},
"notunicode1": {"type": "string", "value": "|\\u."},
"notunicode2": {"type": "string", "value": "|\\u."},
"notunicode3": {"type": "string", "value": "|\\u0075."},
"notunicode4": {"type": "string", "value": "|\\u."},
"quote": {"type": "string", "value": "|\"."},
"tab": {"type": "string", "value": "|\t."},
"unitseparator": {"type": "string", "value": "|\u001f."}
}
FAIL valid/string/multiline
Values for key "equivalent_three" don't match:
Expected: The quick brown fox jumps over the lazy dog.
Your encoder: The quick brown fox jumps over the lazy dog.
input sent to parser-cmd:
# NOTE: this file includes some literal tab characters.
equivalent_one = "The quick brown fox jumps over the lazy dog."
equivalent_two = """
The quick brown \
fox jumps over \
the lazy dog."""
equivalent_three = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
whitespace-after-bs = """\
The quick brown \
fox jumps over \
the lazy dog.\
"""
no-space = """a\
b"""
# Has tab character.
keep-ws-before = """a \
b"""
escape-bs-1 = """a \\
b"""
escape-bs-2 = """a \\\
b"""
escape-bs-3 = """a \\\\
b"""
output from parser-cmd (stdout):
{
"equivalent_one": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"equivalent_two": {"type": "string", "value": "The quick brown \n\n fox jumps over the lazy dog."},
"escape-bs-1": {"type": "string", "value": "a \\\nb"},
"escape-bs-2": {"type": "string", "value": "a \\b"},
"escape-bs-3": {"type": "string", "value": "a \\\\\n b"},
"keep-ws-before": {"type": "string", "value": "a \t b"},
"no-space": {"type": "string", "value": "a b"},
"equivalent_three": {
"type": "string",
"value": " The quick brown fox jumps over the lazy dog. "
},
"whitespace-after-bs": {
"type": "string",
"value": " The quick brown fox jumps over the lazy dog. "
}
}
want:
{
"equivalent_one": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"equivalent_three": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"equivalent_two": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."},
"escape-bs-1": {"type": "string", "value": "a \\\nb"},
"escape-bs-2": {"type": "string", "value": "a \\b"},
"escape-bs-3": {"type": "string", "value": "a \\\\\n b"},
"keep-ws-before": {"type": "string", "value": "a \tb"},
"no-space": {"type": "string", "value": "ab"},
"whitespace-after-bs": {"type": "string", "value": "The quick brown fox jumps over the lazy dog."}
}
FAIL valid/string/multiline-empty
Values for key "empty-3" don't match:
Expected:
Your encoder:
input sent to parser-cmd:
empty-1 = """"""
# A newline immediately following the opening delimiter will be trimmed.
empty-2 = """
"""
# \ at the end of line trims newlines as well; note that last \ is followed by
# two spaces, which are ignored.
empty-3 = """\
"""
empty-4 = """\
\
\
"""
output from parser-cmd (stdout):
{
"empty-1": {"type": "string", "value": ""},
"empty-2": {"type": "string", "value": ""},
"empty-3": {"type": "string", "value": " "},
"empty-4": {"type": "string", "value": " "}
}
want:
{
"empty-1": {"type": "string", "value": ""},
"empty-2": {"type": "string", "value": ""},
"empty-3": {"type": "string", "value": ""},
"empty-4": {"type": "string", "value": ""}
}
FAIL valid/string/quoted-unicode
error: Invalid expression for value
--> stdin:2:18-114
|
2 | escaped_string = "\u0000 \u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unexpected invalid sequence
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
input sent to parser-cmd:
escaped_string = "\u0000 \u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff"
not_escaped_string = '\u0000 \u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff'
basic_string = "~ ÿ 𐀀 "
literal_string = '~ ÿ 𐀀 '
output from parser-cmd (stderr):
error: Invalid expression for value
--> stdin:2:18-114
|
2 | escaped_string = "\u0000 \u0008 \u000c \U00000041 \u007f \u0080 \u00ff \ud7ff \ue000 \uffff \U00010000 \U0010ffff"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unexpected invalid sequence
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
want:
FAIL valid/string/unicode-escape
error: Invalid expression for value
--> stdin:6:11-18
|
6 | null-1 = "\u0000"
| ^^^^^^^^ unexpected invalid sequence
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
input sent to parser-cmd:
delta-1 = "\u03B4"
delta-2 = "\U000003B4"
a = "\u0061"
b = "\u0062"
c = "\U00000063"
null-1 = "\u0000"
null-2 = "\U00000000"
ml-delta-1 = """\u03B4"""
ml-delta-2 = """\U000003B4"""
ml-a = """\u0061"""
ml-b = """\u0062"""
ml-c = """\U00000063"""
ml-null-1 = """\u0000"""
ml-null-2 = """\U00000000"""
output from parser-cmd (stderr):
error: Invalid expression for value
--> stdin:6:11-18
|
6 | null-1 = "\u0000"
| ^^^^^^^^ unexpected invalid sequence
|
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in toml2json
at ../test/compliance/toml2json.f90:63
#4 0x… in main
at ../test/compliance/toml2json.f90:17
Exit 1
want:
FAIL invalid/array/extend-defined-aot
signal: segmentation fault
input sent to parser-cmd:
[[tab.arr]]
[tab]
arr.val1=1
output from parser-cmd (stderr):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:443
#4 0x… in parse_root
at ../src/tomlf/de/parser.f90:134
#5 0x… in __tomlf_de_parser_MOD_parse
at ../src/tomlf/de/parser.f90:105
#6 0x… in __tomlf_de_MOD_toml_load_unit
at ../src/tomlf/de.f90:124
#7 0x… in toml2json
at ../test/compliance/toml2json.f90:55
#8 0x… in main
at ../test/compliance/toml2json.f90:17
want:
Exit code 1
FAIL invalid/array/extending-table
signal: aborted
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 (stderr):
double free or corruption (out)
Program received signal SIGABRT: Process abort signal.
Backtrace for this error:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x… in __pthread_kill_implementation
at ./nptl/pthread_kill.c:44
#4 0x… in __GI_raise
at ../sysdeps/posix/raise.c:26
#5 0x… in __GI_abort
at ./stdlib/abort.c:79
#6 0x… in __libc_message_impl
at ../sysdeps/posix/libc_fatal.c:132
#7 0x… in malloc_printerr
at ./malloc/malloc.c:5772
#8 0x… in _int_free_merge_chunk
at ./malloc/malloc.c:4676
#9 0x… in __GI___libc_free
at ./malloc/malloc.c:3398
#10 0x… in __tomlf_diagnostic_MOD_render_diagnostic
at ../src/tomlf/diagnostic.f90:160
#11 0x… in make_error
at ../src/tomlf/de/parser.f90:751
#12 0x… in __tomlf_de_parser_MOD_parse
at ../src/tomlf/de/parser.f90:107
#13 0x… in __tomlf_de_MOD_toml_load_unit
at ../src/tomlf/de.f90:124
#14 0x… in toml2json
at ../test/compliance/toml2json.f90:55
#15 0x… in main
at ../test/compliance/toml2json.f90:17
want:
Exit code 1
FAIL invalid/control/bare-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains a single carriage return control character
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/control/comment-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-cr = "Carriage return in comment" #
a=1
output from parser-cmd (stdout):
{
"a": {"type": "integer", "value": "1"},
"comment-cr": {"type": "string", "value": "Carriage return in comment"}
}
want:
Exit code 1
FAIL invalid/control/comment-del
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-del = "0x7f" #
output from parser-cmd (stdout):
{
"comment-del": {"type": "string", "value": "0x7f"}
}
want:
Exit code 1
FAIL invalid/control/comment-ff
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-ff = "0x7f" #
output from parser-cmd (stdout):
{
"comment-ff": {"type": "string", "value": "0x7f"}
}
want:
Exit code 1
FAIL invalid/control/comment-lf
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-lf = "ctrl-P" #
output from parser-cmd (stdout):
{
"comment-lf": {"type": "string", "value": "ctrl-P"}
}
want:
Exit code 1
FAIL invalid/control/comment-null
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-null = "null" #
output from parser-cmd (stdout):
{
"comment-null": {"type": "string", "value": "null"}
}
want:
Exit code 1
FAIL invalid/control/comment-us
Expected an error, but no error was reported.
input sent to parser-cmd:
comment-us = "ctrl-_" #
output from parser-cmd (stdout):
{
"comment-us": {"type": "string", "value": "ctrl-_"}
}
want:
Exit code 1
FAIL invalid/control/multi-cr
Expected an error, but no error was reported.
input sent to parser-cmd:
multi-cr = """null
"""
output from parser-cmd (stdout):
{
"multi-cr": {"type": "string", "value": "null\n"}
}
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\n"}
}
want:
Exit code 1
FAIL invalid/datetime/time-no-leads
Expected an error, but no error was reported.
input sent to parser-cmd:
# Leading 0 is always required.
d = 2023-10-01T1:32:00Z
output from parser-cmd (stdout):
{
"d": {"type": "date-local", "value": "2023-10-01"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-codepoint
Expected an error, but no error was reported.
input sent to parser-cmd:
# Invalid codepoint U+D800 :
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-comment
Expected an error, but no error was reported.
input sent to parser-cmd:
#
output from parser-cmd (stdout):
{}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-multiline
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains an invalid UTF-8 sequence.
bad = """"""
output from parser-cmd (stdout):
{
"bad": {"type": "string", "value": "�"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-multiline-literal
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains an invalid UTF-8 sequence.
bad = ''''''
output from parser-cmd (stdout):
{
"bad": {"type": "string", "value": "�"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-string
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains an invalid UTF-8 sequence.
bad = ""
output from parser-cmd (stdout):
{
"bad": {"type": "string", "value": "�"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-utf8-in-string-literal
Expected an error, but no error was reported.
input sent to parser-cmd:
# The following line contains an invalid UTF-8 sequence.
bad = ''
output from parser-cmd (stdout):
{
"bad": {"type": "string", "value": "�"}
}
want:
Exit code 1
FAIL invalid/inline-table/duplicate-key-4
signal: segmentation fault
input sent to parser-cmd:
tbl = { a.b = "a_b", a.b.c = "a_b_c" }
output from parser-cmd (stderr):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:443
#4 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:459
#5 0x… in parse_inline_table
at ../src/tomlf/de/parser.f90:598
#6 0x… in parse_inline_table
at ../src/tomlf/de/parser.f90:568
#7 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:497
#8 0x… in parse_root
at ../src/tomlf/de/parser.f90:134
#9 0x… in __tomlf_de_parser_MOD_parse
at ../src/tomlf/de/parser.f90:105
#10 0x… in __tomlf_de_MOD_toml_load_unit
at ../src/tomlf/de.f90:124
#11 0x… in toml2json
at ../test/compliance/toml2json.f90:55
#12 0x… in main
at ../test/compliance/toml2json.f90:17
want:
Exit code 1
FAIL invalid/inline-table/overwrite-06
signal: segmentation fault
input sent to parser-cmd:
a = { b = 1, b.c = 2 }
output from parser-cmd (stderr):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:443
#4 0x… in parse_inline_table
at ../src/tomlf/de/parser.f90:598
#5 0x… in parse_inline_table
at ../src/tomlf/de/parser.f90:568
#6 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:497
#7 0x… in parse_root
at ../src/tomlf/de/parser.f90:134
#8 0x… in __tomlf_de_parser_MOD_parse
at ../src/tomlf/de/parser.f90:105
#9 0x… in __tomlf_de_MOD_toml_load_unit
at ../src/tomlf/de.f90:124
#10 0x… in toml2json
at ../test/compliance/toml2json.f90:55
#11 0x… in main
at ../test/compliance/toml2json.f90:17
want:
Exit code 1
FAIL invalid/inline-table/overwrite-07
signal: segmentation fault
input sent to parser-cmd:
tab = { inner.table = [{}], inner.table.val = "bad" }
output from parser-cmd (stderr):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:443
#4 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:459
#5 0x… in parse_inline_table
at ../src/tomlf/de/parser.f90:598
#6 0x… in parse_inline_table
at ../src/tomlf/de/parser.f90:568
#7 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:497
#8 0x… in parse_root
at ../src/tomlf/de/parser.f90:134
#9 0x… in __tomlf_de_parser_MOD_parse
at ../src/tomlf/de/parser.f90:105
#10 0x… in __tomlf_de_MOD_toml_load_unit
at ../src/tomlf/de.f90:124
#11 0x… in toml2json
at ../test/compliance/toml2json.f90:55
#12 0x… in main
at ../test/compliance/toml2json.f90:17
want:
Exit code 1
FAIL invalid/key/dotted-redefine-table-1
signal: segmentation fault
input sent to parser-cmd:
a = false
a.b = true
output from parser-cmd (stderr):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:443
#4 0x… in parse_root
at ../src/tomlf/de/parser.f90:134
#5 0x… in __tomlf_de_parser_MOD_parse
at ../src/tomlf/de/parser.f90:105
#6 0x… in __tomlf_de_MOD_toml_load_unit
at ../src/tomlf/de.f90:124
#7 0x… in toml2json
at ../test/compliance/toml2json.f90:55
#8 0x… in main
at ../test/compliance/toml2json.f90:17
want:
Exit code 1
FAIL invalid/key/dotted-redefine-table-2
signal: segmentation fault
input sent to parser-cmd:
# Defined a.b as int
a.b = 1
# Tries to access it as table: error
a.b.c = 2
output from parser-cmd (stderr):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:443
#4 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:459
#5 0x… in parse_root
at ../src/tomlf/de/parser.f90:134
#6 0x… in __tomlf_de_parser_MOD_parse
at ../src/tomlf/de/parser.f90:105
#7 0x… in __tomlf_de_MOD_toml_load_unit
at ../src/tomlf/de.f90:124
#8 0x… in toml2json
at ../test/compliance/toml2json.f90:55
#9 0x… in main
at ../test/compliance/toml2json.f90:17
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-01 24:00:00
"}
}
want:
Exit code 1
FAIL invalid/local-datetime/minute-over
Expected an error, but no error was reported.
input sent to parser-cmd:
# time-minute = 2DIGIT ; 00-59
d = 2006-01-01T00:60:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "2006-01-01 00:60:00
"}
}
want:
Exit code 1
FAIL invalid/local-datetime/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 = 2006-01-01T00:00:61
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "2006-01-01 00:00:61
"}
}
want:
Exit code 1
FAIL invalid/local-datetime/time-no-leads
Expected an error, but no error was reported.
input sent to parser-cmd:
# Leading 0 is always required.
d = 2023-10-01T1:32:00Z
output from parser-cmd (stdout):
{
"d": {"type": "date-local", "value": "2023-10-01"}
}
want:
Exit code 1
FAIL invalid/string/basic-out-of-range-unicode-escape-2
Expected an error, but no error was reported.
input sent to parser-cmd:
a = "\U00D80000"
output from parser-cmd (stdout):
{
"a": {"type": "string", "value": "�����"}
}
want:
Exit code 1
FAIL invalid/table/append-to-array-with-dotted-keys
signal: segmentation fault
input sent to parser-cmd:
[[a.b]]
[a]
b.y = 2
output from parser-cmd (stderr):
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x… in parse_keyval
at ../src/tomlf/de/parser.f90:443
#4 0x… in parse_root
at ../src/tomlf/de/parser.f90:134
#5 0x… in __tomlf_de_parser_MOD_parse
at ../src/tomlf/de/parser.f90:105
#6 0x… in __tomlf_de_MOD_toml_load_unit
at ../src/tomlf/de.f90:124
#7 0x… in toml2json
at ../test/compliance/toml2json.f90:55
#8 0x… in main
at ../test/compliance/toml2json.f90:17
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/super-twice
Expected an error, but no error was reported.
input sent to parser-cmd:
[a.b]
[a]
[a]
output from parser-cmd (stdout):
{
"a": {
"b": {}
}
}
want:
Exit code 1
toml-test v2024-05-31 [./src/fortran-toml-f/_build/test/compliance/toml2json]: using embedded tests
valid tests: 171 passed, 11 failed
invalid tests: 339 passed, 32 failed
==> ENCODER TESTS
FAIL valid/array/mixed-string-table
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
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):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/inline-table/end-in-bool
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
input sent to parser-cmd:
{
"black": {
"allow_prereleases": {"type": "bool", "value": "true"},
"python": {"type": "string", "value": "\u003e3.6"},
"version": {"type": "string", "value": "\u003e=18.9b0"}
}
}
output from parser-cmd (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/inline-table/key-dotted-5
Could not find key "arr-2.a" in encoder output
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", { b = 1 } ]
arr-4 = [ "str", { b = 1 }, { 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/key/escapes
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
input sent to parser-cmd:
{
"\b": {"type": "string", "value": "bell"},
"\n": {"type": "string", "value": "newline"},
"\"": {"type": "string", "value": "just a quote"},
"backsp\b\b": {},
"À": {"type": "string", "value": "latin capital letter A with grave"},
"\"quoted\"": {
"quote": {"type": "bool", "value": "true"}
},
"a.b": {
"À": {}
}
}
output from parser-cmd (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/key/quoted-unicode
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
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 (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/key/special-chars
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
input sent to parser-cmd:
{
"=~!@$^\u0026*()_+-`1234567890[]|/?\u003e\u003c.,;:'=": {"type": "integer", "value": "1"}
}
output from parser-cmd (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/spec/array-0
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
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 (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/spec/float-0
Values for key "flt7" differ:
Expected: 0.0000000000000000000000000000000006626 (float64)
Your encoder: 0 (float64)
input sent to parser-cmd:
{
"flt1": {"type": "float", "value": "1"},
"flt2": {"type": "float", "value": "3.1415"},
"flt3": {"type": "float", "value": "-0.01"},
"flt4": {"type": "float", "value": "5e+22"},
"flt5": {"type": "float", "value": "1e+06"},
"flt6": {"type": "float", "value": "-0.02"},
"flt7": {"type": "float", "value": "6.626e-34"}
}
output from parser-cmd (stdout):
flt1 = 1.0000000000000000
flt2 = 3.1415000000000002
flt3 = -0.0100000000000000
flt4 = 4.9999999999999996E+22
flt5 = 1.0000000000000000E+6
flt6 = -0.0200000000000000
flt7 = 0.0000000000000000
want:
# fractional
flt1 = +1.0
flt2 = 3.1415
flt3 = -0.01
# exponent
flt4 = 5e+22
flt5 = 1e06
flt6 = -2E-2
# both
flt7 = 6.626e-34
FAIL valid/spec/string-5
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
input sent to parser-cmd:
{
"quoted": {"type": "string", "value": "Tom \"Dubs\" Preston-Werner"},
"regex": {"type": "string", "value": "\u003c\\i\\c*\\s*\u003e"},
"winpath": {"type": "string", "value": "C:\\Users\\nodejs\\templates"},
"winpath2": {"type": "string", "value": "\\\\ServerX\\admin$\\system32\\"}
}
output from parser-cmd (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/string/escapes
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
input sent to parser-cmd:
{
"backslash": {"type": "string", "value": "|\\."},
"backspace": {"type": "string", "value": "|\b."},
"carriage": {"type": "string", "value": "|\r."},
"delete": {"type": "string", "value": "|."},
"formfeed": {"type": "string", "value": "|\f."},
"newline": {"type": "string", "value": "|\n."},
"notunicode1": {"type": "string", "value": "|\\u."},
"notunicode2": {"type": "string", "value": "|\\u."},
"notunicode3": {"type": "string", "value": "|\\u0075."},
"notunicode4": {"type": "string", "value": "|\\u."},
"quote": {"type": "string", "value": "|\"."},
"tab": {"type": "string", "value": "|\t."},
"unitseparator": {"type": "string", "value": "|\u001f."}
}
output from parser-cmd (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/string/quoted-unicode
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
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 (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
FAIL valid/string/unicode-escape
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
input sent to parser-cmd:
{
"a": {"type": "string", "value": "a"},
"b": {"type": "string", "value": "b"},
"c": {"type": "string", "value": "c"},
"delta-1": {"type": "string", "value": "δ"},
"delta-2": {"type": "string", "value": "δ"},
"ml-a": {"type": "string", "value": "a"},
"ml-b": {"type": "string", "value": "b"},
"ml-c": {"type": "string", "value": "c"},
"ml-delta-1": {"type": "string", "value": "δ"},
"ml-delta-2": {"type": "string", "value": "δ"},
"ml-null-1": {"type": "string", "value": "\u0000"},
"ml-null-2": {"type": "string", "value": "\u0000"},
"null-1": {"type": "string", "value": "\u0000"},
"null-2": {"type": "string", "value": "\u0000"}
}
output from parser-cmd (stderr):
ERROR STOP
Error termination. Backtrace:
#0 0x… in ???
#1 0x… in ???
#2 0x… in ???
#3 0x… in json2toml
at ../test/compliance/json2toml.f90:53
#4 0x… in main
at ../test/compliance/json2toml.f90:17
Exit 1
want:
toml-test v2024-05-31 [./src/fortran-toml-f/_build/test/compliance/json2toml]: using embedded tests
encoder tests: 170 passed, 12 failed
took 1.2 145.63