toml-c version 7e2c57b
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/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/bare-null
     Expected an error, but no error was reported.

     input sent to parser-cmd:
       bare-null         = "some value" 

     output from parser-cmd (stdout):
       {
         "bare-null": {"type": "string", "value": "some value"}
       }

     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/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/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-18T17:04:07+25:00"}
       }

     want:
       Exit code 1

FAIL invalid/datetime/offset-overflow-minute
     Expected an error, but no error was reported.

     input sent to parser-cmd:
       # Minute must be 00-59; we allow 60 too because some people do write offsets of
       # 60 minutes
       d = 1985-06-18 17:04:07+12:61

     output from parser-cmd (stdout):
       {
         "d": {"type": "datetime", "value": "1985-06-18T17:04:07+12:61"}
       }

     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/utf16-comment
     Expected an error, but no error was reported.

     input sent to parser-cmd:
       # UTF-16 without BOM

     output from parser-cmd (stdout):
       {}

     want:
       Exit code 1

FAIL invalid/encoding/utf16-key
     Expected an error, but no error was reported.

     input sent to parser-cmd:
       k = "v"

     output from parser-cmd (stdout):
       {}

     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/trailing-comma
     Expected an error, but no error was reported.

     input sent to parser-cmd:
       # 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 (stdout):
       {
         "abc": {
           "abc": {"type": "integer", "value": "123"}
         }
       }

     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

toml-test v2024-05-31 [./src/c-toml-c/toml2json]: using embedded tests
  valid tests: 182 passed,  0 failed
invalid tests: 350 passed, 21 failed

==> ENCODER TESTS
(not supported)
took 0.3 4.75