toml version ecb24de
FAIL valid/inline-table/array-values
Backtrace:
12 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 11 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 10 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 9 (save-module-excursion _)
3832:12 8 (_)
In test/test-decoder.scm:
58:14 7 (_)
In toml/parser.scm:
373:22 6 (peg-tree->scm _)
280:18 5 (add-kv-to-tree () _ _)
167:23 4 (loop _)
373:22 3 (peg-tree->scm _)
280:18 2 (add-kv-to-tree () _ _)
167:23 1 (loop _)
In unknown file:
0 (scm-error misc-error #f "~A ~S" ("err: ~a" array) #f)
ERROR: In procedure scm-error:
err: ~a array
Exit 1
input sent to parser-cmd:
# "No newlines are allowed between the curly braces unless they are valid within
# a value"
a = { a = [
]}
b = { a = [
1,
2,
], b = [
3,
4,
]}
output from parser-cmd (stderr):
Backtrace:
12 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 11 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 10 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 9 (save-module-excursion _)
3832:12 8 (_)
In test/test-decoder.scm:
58:14 7 (_)
In toml/parser.scm:
373:22 6 (peg-tree->scm _)
280:18 5 (add-kv-to-tree () _ _)
167:23 4 (loop _)
373:22 3 (peg-tree->scm _)
280:18 2 (add-kv-to-tree () _ _)
167:23 1 (loop _)
In unknown file:
0 (scm-error misc-error #f "~A ~S" ("err: ~a" array) #f)
ERROR: In procedure scm-error:
err: ~a array
Exit 1
want:
FAIL valid/key/dotted-empty
Backtrace:
8 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 7 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 6 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 5 (save-module-excursion _)
3832:12 4 (_)
In test/test-decoder.scm:
58:14 3 (_)
In toml/parser.scm:
367:45 2 (peg-tree->scm _)
In srfi/srfi-1.scm:
592:17 1 (map1 ((simple-key (simple-key "x"))))
In unknown file:
0 (string-join (simple-key "x") "" #)
ERROR: In procedure string-join:
In procedure string-append: Wrong type (expecting string): simple-key
Exit 1
input sent to parser-cmd:
''.x = "empty.x"
x."" = "x.empty"
[a]
"".'' = "empty.empty"
output from parser-cmd (stderr):
Backtrace:
8 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 7 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 6 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 5 (save-module-excursion _)
3832:12 4 (_)
In test/test-decoder.scm:
58:14 3 (_)
In toml/parser.scm:
367:45 2 (peg-tree->scm _)
In srfi/srfi-1.scm:
592:17 1 (map1 ((simple-key (simple-key "x"))))
In unknown file:
0 (string-join (simple-key "x") "" #)
ERROR: In procedure string-join:
In procedure string-append: Wrong type (expecting string): simple-key
Exit 1
want:
FAIL valid/spec/table-9
Backtrace:
7 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 6 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 5 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 4 (save-module-excursion _)
3832:12 3 (_)
In test/test-decoder.scm:
58:14 2 (_)
In toml/parser.scm:
386:13 1 (peg-tree->scm _)
In unknown file:
0 (scm-error misc-error #f "~A ~S ~S ~S" ("guile-toml…" …) …)
ERROR: In procedure scm-error:
guile-toml: redefinition not allowed ("fruit" "apple" "texture") (("fruit" "apple" "taste") ("fruit" "apple") ("fruit")) 1
Exit 1
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 (stderr):
Backtrace:
7 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 6 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 5 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 4 (save-module-excursion _)
3832:12 3 (_)
In test/test-decoder.scm:
58:14 2 (_)
In toml/parser.scm:
386:13 1 (peg-tree->scm _)
In unknown file:
0 (scm-error misc-error #f "~A ~S ~S ~S" ("guile-toml…" …) …)
ERROR: In procedure scm-error:
guile-toml: redefinition not allowed ("fruit" "apple" "texture") (("fruit" "apple" "taste") ("fruit" "apple") ("fruit")) 1
Exit 1
want:
FAIL valid/table/array-within-dotted
Backtrace:
7 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 6 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 5 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 4 (save-module-excursion _)
3832:12 3 (_)
In test/test-decoder.scm:
58:14 2 (_)
In toml/parser.scm:
399:9 1 (peg-tree->scm _)
In unknown file:
0 (scm-error misc-error #f "~A ~S ~S ~S" ("guile-toml…" …) …)
ERROR: In procedure scm-error:
guile-toml: redefinition not allowed ("fruit" "apple" "seeds") (("fruit")) 0
Exit 1
input sent to parser-cmd:
[fruit]
apple.color = "red"
[[fruit.apple.seeds]]
size = 2
output from parser-cmd (stderr):
Backtrace:
7 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 6 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 5 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 4 (save-module-excursion _)
3832:12 3 (_)
In test/test-decoder.scm:
58:14 2 (_)
In toml/parser.scm:
399:9 1 (peg-tree->scm _)
In unknown file:
0 (scm-error misc-error #f "~A ~S ~S ~S" ("guile-toml…" …) …)
ERROR: In procedure scm-error:
guile-toml: redefinition not allowed ("fruit" "apple" "seeds") (("fruit")) 0
Exit 1
want:
FAIL valid/table/empty-name
Backtrace:
8 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 7 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 6 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 5 (save-module-excursion _)
3832:12 4 (_)
In test/test-decoder.scm:
58:14 3 (_)
In toml/parser.scm:
376:22 2 (peg-tree->scm _)
In srfi/srfi-1.scm:
592:17 1 (map1 ((simple-key (simple-key "a"))))
In unknown file:
0 (string-join (simple-key "a") "" #)
ERROR: In procedure string-join:
In procedure string-append: Wrong type (expecting string): simple-key
Exit 1
input sent to parser-cmd:
['']
x = 1
["".a]
x = 2
[a.'']
x = 3
output from parser-cmd (stderr):
Backtrace:
8 (apply-smob/1 #)
In ice-9/boot-9.scm:
705:2 7 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 6 (_ #(#(#)))
In ice-9/boot-9.scm:
2312:4 5 (save-module-excursion _)
3832:12 4 (_)
In test/test-decoder.scm:
58:14 3 (_)
In toml/parser.scm:
376:22 2 (peg-tree->scm _)
In srfi/srfi-1.scm:
592:17 1 (map1 ((simple-key (simple-key "a"))))
In unknown file:
0 (string-join (simple-key "a") "" #)
ERROR: In procedure string-join:
In procedure string-append: Wrong type (expecting string): simple-key
Exit 1
want:
FAIL invalid/array/extend-defined-aot
Expected an error, but no error was reported.
input sent to parser-cmd:
[[tab.arr]]
[tab]
arr.val1=1
output from parser-cmd (stdout):
{
"tab": {"arr": [{
"val1": {"type": "integer", "value": "1"}
}]}
}
want:
Exit code 1
FAIL invalid/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-02-29T15: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-02-30T15:15:15Z"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-overflow-hour
Expected an error, but no error was reported.
input sent to parser-cmd:
# Hour must be 00-24
d = 1985-06-18 17:04:07+25:00
output from parser-cmd (stdout):
{
"d": {"type": "datetime", "value": "1985-06-18 17:04:07+25:00"}
}
want:
Exit code 1
FAIL invalid/inline-table/duplicate-key-3
Expected an error, but no error was reported.
input sent to parser-cmd:
tbl = { fruit = { apple.color = "red" }, fruit.apple.texture = { smooth = true } }
output from parser-cmd (stdout):
{
"tbl": {
"fruit": {
"apple": {
"color": {"type": "string", "value": "red"},
"texture": {
"smooth": {"type": "bool", "value": "true"}
}
}
}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-07
Expected an error, but no error was reported.
input sent to parser-cmd:
tab = { inner.table = [{}], inner.table.val = "bad" }
output from parser-cmd (stdout):
{
"tab": {
"inner": {"table": [{
"val": {"type": "string", "value": "bad"}
}]}
}
}
want:
Exit code 1
FAIL invalid/inline-table/overwrite-08
Expected an error, but no error was reported.
input sent to parser-cmd:
tab = { inner = { dog = "best" }, inner.cat = "worst" }
output from parser-cmd (stdout):
{
"tab": {
"inner": {
"cat": {"type": "string", "value": "worst"},
"dog": {"type": "string", "value": "best"}
}
}
}
want:
Exit code 1
FAIL invalid/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": "date-local", "value": "2100-02-29"}
}
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": "date-local", "value": "1988-02-30"}
}
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-local", "value": "2100-02-29T15:15:15"}
}
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-local", "value": "1988-02-30T15:15:15"}
}
want:
Exit code 1
FAIL invalid/spec/inline-table-2-0
Expected an error, but no error was reported.
input sent to parser-cmd:
[product]
type = { name = "Nail" }
type.edible = false # INVALID
output from parser-cmd (stdout):
{
"product": {
"type": {
"edible": {"type": "bool", "value": "false"},
"name": {"type": "string", "value": "Nail"}
}
}
}
want:
Exit code 1
FAIL invalid/string/bad-uni-esc-6
Expected an error, but no error was reported.
input sent to parser-cmd:
bad-uni-esc-6 = "This string contains a non scalar unicode codepoint \uD801"
output from parser-cmd (stdout):
{
"bad-uni-esc-6": {"type": "string", "value": "This string contains a non scalar unicode codepoint �"}
}
want:
Exit code 1
FAIL invalid/table/append-to-array-with-dotted-keys
Expected an error, but no error was reported.
input sent to parser-cmd:
[[a.b]]
[a]
b.y = 2
output from parser-cmd (stdout):
{
"a": {"b": [{
"y": {"type": "integer", "value": "2"}
}]}
}
want:
Exit code 1
FAIL invalid/table/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
toml-test v2024-05-31 [./src/guile-toml/test/test-decoder.scm]: using embedded tests
valid tests: 177 passed, 5 failed
invalid tests: 356 passed, 15 failed
==> ENCODER TESTS
FAIL valid/inline-table/array-values
Could not find key "a.a" in encoder output
input sent to parser-cmd:
{
"a": {"a": []},
"b": {
"a": [
{"type": "integer", "value": "1"},
{"type": "integer", "value": "2"}
],
"b": [
{"type": "integer", "value": "3"},
{"type": "integer", "value": "4"}
]
}
}
output from parser-cmd (stdout):
["b"]
"b" = [3, 4]
"a" = [1, 2]
["a"]
want:
# "No newlines are allowed between the curly braces unless they are valid within
# a value"
a = { a = [
]}
b = { a = [
1,
2,
], b = [
3,
4,
]}
FAIL valid/spec/float-0
decode TOML from encoder:
toml: line 3 (last key "flt5"): Invalid float value: "1e+06.0"
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):
"flt7" = 6.626e-34
"flt6" = -0.02
"flt5" = 1e+06.0
"flt4" = 5e+22.0
"flt3" = -0.01
"flt2" = 3.1415
"flt1" = 1.0
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-0
Values for key "str" differ:
Expected: I'm a string. "You can quote me". Name José
Location SF. (string)
Your encoder: I'm a string. "You can quote me". Name\u0009José
Location\u0009SF. (string)
input sent to parser-cmd:
{
"str": {"type": "string", "value": "I'm a string. \"You can quote me\". Name\tJosé\nLocation\tSF."}
}
output from parser-cmd (stdout):
"str" = '''I'm a string. "You can quote me". Name\u0009José
Location\u0009SF.'''
want:
str = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
FAIL valid/spec/string-6
decode TOML from encoder:
toml: line 1: expected a top-level item to end with a newline, comment, or EOF, but got 't' instead
input sent to parser-cmd:
{
"lines": {"type": "string", "value": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n"},
"regex2": {"type": "string", "value": "I [dw]on't need \\d{2} apples"}
}
output from parser-cmd (stdout):
"regex2" = 'I [dw]on't need \d{2} apples'
"lines" = """The first newline is
trimmed in raw strings.
All other whitespace
is preserved.
"""
want:
regex2 = '''I [dw]on't need \d{2} apples'''
lines = '''
The first newline is
trimmed in raw strings.
All other whitespace
is preserved.
'''
toml-test v2024-05-31 [./src/guile-toml/test/test-encoder.scm]: using embedded tests
encoder tests: 178 passed, 4 failed
took 0.0 0.0