smol-toml version 427e7ba
FAIL valid/datetime/edge
Values for key "first-local" don't match:
Expected: 0001-01-01 00:00:00 +0000 UTC
Your encoder: 2001-01-01 00:00:00 +0000 UTC
input sent to parser-cmd (PID 17646):
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 (PID 17646) (stdout):
{
"first-date": {"type": "date-local", "value": "0001-01-01"},
"first-local": {"type": "datetime-local", "value": "2001-01-01T00:00:00.000"},
"first-offset": {"type": "datetime", "value": "2001-01-01T00:00:00.000Z"},
"last-date": {"type": "date-local", "value": "9999-12-31"},
"last-local": {"type": "datetime-local", "value": "9999-12-31T23:59:59.000"},
"last-offset": {"type": "datetime", "value": "9999-12-31T23:59:59.000Z"}
}
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 invalid/datetime/feb-29
Expected an error, but no error was reported.
input sent to parser-cmd (PID 20680):
"not a leap year" = 2100-02-29T15:15:15Z
output from parser-cmd (PID 20680) (stdout):
{
"not a leap year": {"type": "datetime", "value": "2100-03-01T15:15:15.000Z"}
}
want:
Exit code 1
FAIL invalid/datetime/feb-30
Expected an error, but no error was reported.
input sent to parser-cmd (PID 20691):
"only 28 or 29 days in february" = 1988-02-30T15:15:15Z
output from parser-cmd (PID 20691) (stdout):
{
"only 28 or 29 days in february": {"type": "datetime", "value": "1988-03-01T15:15:15.000Z"}
}
want:
Exit code 1
FAIL invalid/datetime/offset-overflow-hour
Expected an error, but no error was reported.
input sent to parser-cmd (PID 20874):
# Hour must be 00-24
d = 1985-06-18 17:04:07+25:00
output from parser-cmd (PID 20874) (stdout):
{
"d": {"type": "datetime", "value": "1985-06-18T17:04:07.000+25:00"}
}
want:
Exit code 1
FAIL invalid/encoding/bad-codepoint
Expected an error, but no error was reported.
input sent to parser-cmd (PID 21040):
# Invalid codepoint U+D800 : í €
output from parser-cmd (PID 21040) (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 21048):
# Ã
output from parser-cmd (PID 21048) (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 (PID 21111):
# The following line contains an invalid UTF-8 sequence.
bad = """Ã"""
output from parser-cmd (PID 21111) (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 (PID 21109):
# The following line contains an invalid UTF-8 sequence.
bad = '''Ã'''
output from parser-cmd (PID 21109) (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 (PID 21132):
# The following line contains an invalid UTF-8 sequence.
bad = "Ã"
output from parser-cmd (PID 21132) (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 (PID 21113):
# The following line contains an invalid UTF-8 sequence.
bad = 'Ã'
output from parser-cmd (PID 21113) (stdout):
{
"bad": {"type": "string", "value": "�"}
}
want:
Exit code 1
FAIL invalid/key/no-eol-05
Expected an error, but no error was reported.
input sent to parser-cmd (PID 23099):
0=[0]00=[0,0,0]t=["0","0","0"]s=[1000-00-00T00:00:00Z,2000-00-00T00:00:00Z]
output from parser-cmd (PID 23099) (stdout):
{
"0": [{"type": "float", "value": "0"}]
}
want:
Exit code 1
FAIL invalid/local-date/feb-29
Expected an error, but no error was reported.
input sent to parser-cmd (PID 23409):
"not a leap year" = 2100-02-29
output from parser-cmd (PID 23409) (stdout):
{
"not a leap year": {"type": "date-local", "value": "2100-03-01"}
}
want:
Exit code 1
FAIL invalid/local-date/feb-30
Expected an error, but no error was reported.
input sent to parser-cmd (PID 23433):
"only 28 or 29 days in february" = 1988-02-30
output from parser-cmd (PID 23433) (stdout):
{
"only 28 or 29 days in february": {"type": "date-local", "value": "1988-03-01"}
}
want:
Exit code 1
FAIL invalid/local-datetime/feb-29
Expected an error, but no error was reported.
input sent to parser-cmd (PID 23510):
"not a leap year" = 2100-02-29T15:15:15
output from parser-cmd (PID 23510) (stdout):
{
"not a leap year": {"type": "datetime-local", "value": "2100-03-01T15:15:15.000"}
}
want:
Exit code 1
FAIL invalid/local-datetime/feb-30
Expected an error, but no error was reported.
input sent to parser-cmd (PID 23539):
"only 28 or 29 days in february" = 1988-02-30T15:15:15
output from parser-cmd (PID 23539) (stdout):
{
"only 28 or 29 days in february": {"type": "datetime-local", "value": "1988-03-01T15:15:15.000"}
}
want:
Exit code 1
FAIL invalid/string/bad-uni-esc-06
Expected an error, but no error was reported.
input sent to parser-cmd (PID 24123):
bad-uni-esc-6 = "This string contains a non scalar unicode codepoint \uD801"
output from parser-cmd (PID 24123) (stdout):
{
"bad-uni-esc-6": {"type": "string", "value": "This string contains a non scalar unicode codepoint �"}
}
want:
Exit code 1
FAIL invalid/string/bad-uni-esc-6
Expected an error, but no error was reported.
input sent to parser-cmd (PID 24193):
bad-uni-esc-6 = "This string contains a non scalar unicode codepoint \uD801"
output from parser-cmd (PID 24193) (stdout):
{
"bad-uni-esc-6": {"type": "string", "value": "This string contains a non scalar unicode codepoint �"}
}
want:
Exit code 1
FAIL invalid/string/bad-uni-esc-ml-6
Expected an error, but no error was reported.
input sent to parser-cmd (PID 24276):
bad-uni-esc-ml-6 = """This string contains a non scalar unicode codepoint \uD801"""
output from parser-cmd (PID 24276) (stdout):
{
"bad-uni-esc-ml-6": {"type": "string", "value": "This string contains a non scalar unicode codepoint �"}
}
want:
Exit code 1
toml-test v2025-04-23 [./toml-test-parse.mjs]: using embedded tests, 1 skipped
valid tests: 203 passed, 1 failed
invalid tests: 512 passed, 17 failed
==> ENCODER TESTS
toml-test v2025-04-23 [./toml-test-encode.mjs]: using embedded tests, 1 skipped
encoder tests: 204 passed, 0 failed
took 3.6 0.24