otoml version 970e114
FAIL valid/array/open-parent-table
     Array lengths differ for key "parent-table.arr":
       Expected:     2
       Your encoder: 1

     input sent to parser-cmd (PID 3223):
       [[parent-table.arr]]
       [[parent-table.arr]]
       [parent-table]
       not-arr = 1

     output from parser-cmd (PID 3223) (stdout):
       {
         "parent-table": {
           "arr":     [{}],
           "not-arr": {"type": "integer", "value": "1"}
         }
       }

     want:
       {
           "parent-table": {
               "not-arr": {"type": "integer", "value": "1"},
               "arr": [
                   {},
                   {}
               ]
           }
       }

FAIL valid/key/like-date
     Syntax error on line 2, character 1: Unexpected ']'
     Exit 1

     input sent to parser-cmd (PID 3315):
       # '-' is a valid character in keys: make a key that looks like a date.
       2001-02-03   = 1
       "2001-02-04" = 2
       '2001-02-05' = 3

       # Also include datetime and time for good measure; these need to be quoted as
       # ':' isn't a valid bare key.
       "2001-02-06T15:16:17+01:00" = 4
       "2001-02-07T15:16:17"       = 5
       "15:16:17"                  = 6

       # Dotted keys
       a.2001-02-08 = 7
       a.2001-02-09.2001-02-10 = 8
       2001-02-11.a.2001-02-12 = 9

       # Table names
       [2002-01-02]
       k = 10

       [2002-01-02.2024-01-03]
       k = 11

       [[2002-01-04]]
       k = 12

     output from parser-cmd (PID 3315) (stderr):
       Syntax error on line 2, character 1: Unexpected ']'
       Exit 1

     want:
          

FAIL valid/key/numeric-06
     Syntax error on line 1, character 1: "-1" is not a valid key
     Exit 1

     input sent to parser-cmd (PID 3320):
       -1    = true

     output from parser-cmd (PID 3320) (stderr):
       Syntax error on line 1, character 1: "-1" is not a valid key
       Exit 1

     want:
          

FAIL valid/table/array-empty
     Array lengths differ for key "a":
       Expected:     1
       Your encoder: 0

     input sent to parser-cmd (PID 3408):
       [[a]]

     output from parser-cmd (PID 3408) (stdout):
       {
         "a": []
       }

     want:
       {
           "a": [{}]
       }

FAIL invalid/array/extend-defined-aot
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3437):
       [[tab.arr]]
       [tab]
       arr.val1=1

     output from parser-cmd (PID 3437) (stdout):
       {
         "tab": {"arr": [{
           "val1": {"type": "integer", "value": "1"}
         }]}
       }

     want:
       Exit code 1

FAIL invalid/array/extending-table
     exit status 2

     input sent to parser-cmd (PID 3439):
       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 3439) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"a\" overrides a value of type array with a value of type table")

     want:
       Exit code 1

FAIL invalid/array/tables-01
     exit status 2

     input sent to parser-cmd (PID 3470):
       # INVALID TOML DOC
       fruit = []

       [[fruit]] # Not allowed

     output from parser-cmd (PID 3470) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [fruit] is duplicated by an array of tables [[fruit]]")

     want:
       Exit code 1

FAIL invalid/array/tables-02
     exit status 2

     input sent to parser-cmd (PID 3471):
       # INVALID TOML DOC
       [[fruit]]
         name = "apple"

         [[fruit.variety]]
           name = "red delicious"

         # This table conflicts with the previous table
         [fruit.variety]
           name = "granny smith"

     output from parser-cmd (PID 3471) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("array of tables [[fruit.variety]] is duplicated by a table [fruit.variety]")

     want:
       Exit code 1

FAIL invalid/control/multi-cr
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3500):
       multi-cr   = """null
"""

     output from parser-cmd (PID 3500) (stdout):
       {
         "multi-cr": {"type": "string", "value": "null\r"}
       }

     want:
       Exit code 1

FAIL invalid/control/rawmulti-cr
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3507):
       rawmulti-cr   = '''null
'''

     output from parser-cmd (PID 3507) (stdout):
       {
         "rawmulti-cr": {"type": "string", "value": "null\r"}
       }

     want:
       Exit code 1

FAIL invalid/datetime/feb-29
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3525):
       "not a leap year" = 2100-02-29T15:15:15Z

     output from parser-cmd (PID 3525) (stdout):
       {
         "not a leap year": {"type": "datetime", "value": "2100-02-29T15:15:15Z"}
       }

     want:
       Exit code 1

FAIL invalid/inline-table/duplicate-key-01
     exit status 2

     input sent to parser-cmd (PID 3641):
       # Duplicate keys within an inline table are invalid
       a={b=1, b=2}

     output from parser-cmd (PID 3641) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"b\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/inline-table/duplicate-key-02
     exit status 2

     input sent to parser-cmd (PID 3644):
       table1 = { table2.dupe = 1, table2.dupe = 2 }

     output from parser-cmd (PID 3644) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"dupe\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/inline-table/duplicate-key-03
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3643):
       tbl = { fruit = { apple.color = "red" }, fruit.apple.texture = { smooth = true } }

     output from parser-cmd (PID 3643) (stdout):
       {
         "tbl": {
           "fruit": {
             "apple": {
               "color": {"type": "string", "value": "red"},
               "texture": {
                 "smooth": {"type": "bool", "value": "true"}
               }
             }
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/inline-table/duplicate-key-04
     exit status 2

     input sent to parser-cmd (PID 3642):
       tbl = { a.b = "a_b", a.b.c = "a_b_c" }

     output from parser-cmd (PID 3642) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"b\" overrides a value of type string with a value of type string")

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-01
     exit status 2

     input sent to parser-cmd (PID 3656):
       a.b=0
       # Since table "a" is already defined, it can't be replaced by an inline table.
       a={}

     output from parser-cmd (PID 3656) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"a\" overrides a value of type table with a value of type table")

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-02
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3657):
       a={}
       # Inline tables are immutable and can't be extended
       [a.b]

     output from parser-cmd (PID 3657) (stdout):
       {
         "a": {
           "b": {}
         }
       }

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-03
     exit status 2

     input sent to parser-cmd (PID 3658):
       a = { b = 1 }
       a.b = 2

     output from parser-cmd (PID 3658) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"b\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-04
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3659):
       inline-t = { nest = {} }

       [[inline-t.nest]]

     output from parser-cmd (PID 3659) (stdout):
       {
         "inline-t": {
           "nest": {}
         }
       }

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-05
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3660):
       inline-t = { nest = {} }

       [inline-t.nest]

     output from parser-cmd (PID 3660) (stdout):
       {
         "inline-t": {
           "nest": {}
         }
       }

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-06
     exit status 2

     input sent to parser-cmd (PID 3661):
       a = { b = 1, b.c = 2 }

     output from parser-cmd (PID 3661) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"b\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-07
     exit status 2

     input sent to parser-cmd (PID 3664):
       tab = { inner.table = [{}], inner.table.val = "bad" }

     output from parser-cmd (PID 3664) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"table\" overrides a value of type array with a value of type string")

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-08
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3668):
       tab = { inner = { dog = "best" }, inner.cat = "worst" }

     output from parser-cmd (PID 3668) (stdout):
       {
         "tab": {
           "inner": {
             "cat": {"type": "string", "value": "worst"},
             "dog": {"type": "string", "value": "best"}
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-09
     exit status 2

     input sent to parser-cmd (PID 3662):
       [tab.nested]
       inline-t = { nest = {} }

       [tab]
       nested.inline-t.nest = 2

     output from parser-cmd (PID 3662) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"nest\" overrides a value of type table with a value of type integer")

     want:
       Exit code 1

FAIL invalid/inline-table/overwrite-10
     exit status 2

     input sent to parser-cmd (PID 3670):
       # Set implicit "b", overwrite "b" (illegal!) and then set another implicit.
       #
       # Caused panic: https://github.com/BurntSushi/toml/issues/403
       a = {b.a = 1, b = 2, b.c = 3}

     output from parser-cmd (PID 3670) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"b\" overrides a value of type table with a value of type integer")

     want:
       Exit code 1

FAIL invalid/key/dotted-redefine-table-01
     exit status 2

     input sent to parser-cmd (PID 3720):
       a = false
       a.b = true

     output from parser-cmd (PID 3720) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"a\" overrides a value of type boolean with a value of type boolean")

     want:
       Exit code 1

FAIL invalid/key/dotted-redefine-table-02
     exit status 2

     input sent to parser-cmd (PID 3721):
       # Defined a.b as int
       a.b = 1
       # Tries to access it as table: error
       a.b.c = 2

     output from parser-cmd (PID 3721) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"b\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/key/duplicate-keys-01
     exit status 2

     input sent to parser-cmd (PID 3727):
       name = "Tom"
       name = "Pradyun"

     output from parser-cmd (PID 3727) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"name\" overrides a value of type string with a value of type string")

     want:
       Exit code 1

FAIL invalid/key/duplicate-keys-02
     exit status 2

     input sent to parser-cmd (PID 3730):
       dupe = false
       dupe = true

     output from parser-cmd (PID 3730) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"dupe\" overrides a value of type boolean with a value of type boolean")

     want:
       Exit code 1

FAIL invalid/key/duplicate-keys-03
     exit status 2

     input sent to parser-cmd (PID 3725):
       spelling   = "favorite"
       "spelling" = "favourite"

     output from parser-cmd (PID 3725) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"spelling\" overrides a value of type string with a value of type string")

     want:
       Exit code 1

FAIL invalid/key/duplicate-keys-04
     exit status 2

     input sent to parser-cmd (PID 3728):
       spelling   = "favorite"
       'spelling' = "favourite"

     output from parser-cmd (PID 3728) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"spelling\" overrides a value of type string with a value of type string")

     want:
       Exit code 1

FAIL invalid/key/duplicate-keys-05
     exit status 2

     input sent to parser-cmd (PID 3722):
       a        = 1
       "\u0061" = 1

     output from parser-cmd (PID 3722) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"a\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/key/duplicate-keys-06
     exit status 2

     input sent to parser-cmd (PID 3723):
       "a'b"      = 1
       "a\u0027b" = 2

     output from parser-cmd (PID 3723) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"a'b\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/key/duplicate-keys-07
     exit status 2

     input sent to parser-cmd (PID 3724):
       "" = 1
       "" = 2

     output from parser-cmd (PID 3724) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/local-date/feb-29
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3773):
       "not a leap year" = 2100-02-29

     output from parser-cmd (PID 3773) (stdout):
       {
         "not a leap year": {"type": "date-local", "value": "2100-02-29"}
       }

     want:
       Exit code 1

FAIL invalid/local-datetime/feb-29
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3784):
       "not a leap year" = 2100-02-29T15:15:15

     output from parser-cmd (PID 3784) (stdout):
       {
         "not a leap year": {"type": "datetime-local", "value": "2100-02-29T15:15:15"}
       }

     want:
       Exit code 1

FAIL invalid/spec-1.0.0/inline-table-2-0
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3807):
       [product]
       type = { name = "Nail" }
       type.edible = false  # INVALID

     output from parser-cmd (PID 3807) (stdout):
       {
         "product": {
           "type": {
             "edible": {"type": "bool", "value": "false"},
             "name":   {"type": "string", "value": "Nail"}
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/spec-1.0.0/inline-table-3-0
     exit status 2

     input sent to parser-cmd (PID 3808):
       [product]
       type.name = "Nail"
       type = { edible = false }  # INVALID

     output from parser-cmd (PID 3808) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"type\" overrides a value of type table with a value of type table")

     want:
       Exit code 1

FAIL invalid/spec-1.0.0/table-9-0
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3814):
       [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 (PID 3814) (stdout):
       {
         "fruit": {
           "apple": {
             "color": {"type": "string", "value": "red"},
             "taste": {
               "sweet": {"type": "bool", "value": "true"}
             },
             "texture": {
               "smooth": {"type": "bool", "value": "true"}
             }
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/spec-1.0.0/table-9-1
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3813):
       [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 (PID 3813) (stdout):
       {
         "fruit": {
           "apple": {
             "color": {"type": "string", "value": "red"},
             "taste": {
               "sweet": {"type": "bool", "value": "true"}
             },
             "texture": {
               "smooth": {"type": "bool", "value": "true"}
             }
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/string/bad-uni-esc-03
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3837):
       bad-uni-esc-3 = "val\U0000000"

     output from parser-cmd (PID 3837) (stdout):
       {
         "bad-uni-esc-3": {"type": "string", "value": "val\u0000000"}
       }

     want:
       Exit code 1

FAIL invalid/string/bad-uni-esc-04
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3838):
       bad-uni-esc-4 = "val\U0000"

     output from parser-cmd (PID 3838) (stdout):
       {
         "bad-uni-esc-4": {"type": "string", "value": "val\u0000"}
       }

     want:
       Exit code 1

FAIL invalid/string/bad-uni-esc-3
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3842):
       bad-uni-esc-3 = "val\U0000000"

     output from parser-cmd (PID 3842) (stdout):
       {
         "bad-uni-esc-3": {"type": "string", "value": "val\u0000000"}
       }

     want:
       Exit code 1

FAIL invalid/string/bad-uni-esc-4
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3843):
       bad-uni-esc-4 = "val\U0000"

     output from parser-cmd (PID 3843) (stdout):
       {
         "bad-uni-esc-4": {"type": "string", "value": "val\u0000"}
       }

     want:
       Exit code 1

FAIL invalid/string/bad-uni-esc-ml-3
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3851):
       bad-uni-esc-ml-3 = """val\U0000000"""

     output from parser-cmd (PID 3851) (stdout):
       {
         "bad-uni-esc-ml-3": {"type": "string", "value": "val\u0000000"}
       }

     want:
       Exit code 1

FAIL invalid/string/bad-uni-esc-ml-4
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3853):
       bad-uni-esc-ml-4 = """val\U0000"""

     output from parser-cmd (PID 3853) (stdout):
       {
         "bad-uni-esc-ml-4": {"type": "string", "value": "val\u0000"}
       }

     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 3901):
       # 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 3901) (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 3905):
       # 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 3905) (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/append-with-dotted-keys-03
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3907):
       [[a.b]]

       [a]
       b.y = 2

     output from parser-cmd (PID 3907) (stdout):
       {
         "a": {"b": [{
           "y": {"type": "integer", "value": "2"}
         }]}
       }

     want:
       Exit code 1

FAIL invalid/table/append-with-dotted-keys-04
     exit status 2

     input sent to parser-cmd (PID 3908):
       [dependencies.foo]
       version = "0.16"

       [dependencies]
       libc = "0.2"

       [dependencies]
       rand = "0.3.14"

     output from parser-cmd (PID 3908) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [dependencies] is defined more than once")

     want:
       Exit code 1

FAIL invalid/table/append-with-dotted-keys-05
     exit status 2

     input sent to parser-cmd (PID 3909):
       a.b.c = 1
       a.b = 2

     output from parser-cmd (PID 3909) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"b\" overrides a value of type table with a value of type integer")

     want:
       Exit code 1

FAIL invalid/table/append-with-dotted-keys-06
     exit status 2

     input sent to parser-cmd (PID 3910):
       a = 1
       a.b = 2

     output from parser-cmd (PID 3910) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"a\" overrides a value of type integer with a value of type integer")

     want:
       Exit code 1

FAIL invalid/table/append-with-dotted-keys-07
     exit status 2

     input sent to parser-cmd (PID 3911):
       a = {k1 = 1, k1.name = "joe"}

     output from parser-cmd (PID 3911) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"k1\" overrides a value of type integer with a value of type string")

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-01
     exit status 2

     input sent to parser-cmd (PID 3922):
       [a]
       b = 1

       [a]
       c = 2

     output from parser-cmd (PID 3922) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [a] is defined more than once")

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-02
     exit status 2

     input sent to parser-cmd (PID 3924):
       [fruit]
       type = "apple"

       [fruit.type]
       apple = "yes"

     output from parser-cmd (PID 3924) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [fruit.type] is defined more than once")

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-03
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3925):
       [fruit]
       apple.color = "red"

       [[fruit.apple]]

     output from parser-cmd (PID 3925) (stdout):
       {
         "fruit": {
           "apple": {
             "color": {"type": "string", "value": "red"}
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-04
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3923):
       [fruit]
       apple.color = "red"

       [fruit.apple] # INVALID

     output from parser-cmd (PID 3923) (stdout):
       {
         "fruit": {
           "apple": {
             "color": {"type": "string", "value": "red"}
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-05
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3926):
       [fruit]
       apple.taste.sweet = true

       [fruit.apple.taste] # INVALID

     output from parser-cmd (PID 3926) (stdout):
       {
         "fruit": {
           "apple": {
             "taste": {
               "sweet": {"type": "bool", "value": "true"}
             }
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-06
     exit status 2

     input sent to parser-cmd (PID 3927):
       [tbl]
       [[tbl]]

     output from parser-cmd (PID 3927) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [tbl] is duplicated by an array of tables [[tbl]]")

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-07
     exit status 2

     input sent to parser-cmd (PID 3929):
       [[tbl]]
       [tbl]

     output from parser-cmd (PID 3929) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("array of tables [[tbl]] is duplicated by a table [tbl]")

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-08
     exit status 2

     input sent to parser-cmd (PID 3930):
       [a]
       b = { c = 2, d = {} }
       [a.b]
       c = 2

     output from parser-cmd (PID 3930) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [a.b] is defined more than once")

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-09
     exit status 2

     input sent to parser-cmd (PID 3939):
       [a]
       foo="bar"
       [a.b]
       foo="bar"
       [a]

     output from parser-cmd (PID 3939) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [a] is defined more than once")

     want:
       Exit code 1

FAIL invalid/table/duplicate-key-10
     exit status 2

     input sent to parser-cmd (PID 3928):
       a = []
       [[a.b]]

     output from parser-cmd (PID 3928) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"a\" overrides a value of type array with a value of type array")

     want:
       Exit code 1

FAIL invalid/table/overwrite-array-in-parent
     exit status 2

     input sent to parser-cmd (PID 3962):
       [[parent-table.arr]]
       [parent-table]
       not-arr = 1
       arr = 2

     output from parser-cmd (PID 3962) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"arr\" overrides a value of type array with a value of type integer")

     want:
       Exit code 1

FAIL invalid/table/overwrite-bool-with-array
     exit status 2

     input sent to parser-cmd (PID 3953):
       a=true
       [[a]]

     output from parser-cmd (PID 3953) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [a] is duplicated by an array of tables [[a]]")

     want:
       Exit code 1

FAIL invalid/table/overwrite-with-deep-table
     exit status 2

     input sent to parser-cmd (PID 3955):
       a=1
       [a.b.c.d]

     output from parser-cmd (PID 3955) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("duplicate key \"a\" overrides a value of type integer with a value of type table")

     want:
       Exit code 1

FAIL invalid/table/redefine-01
     exit status 2

     input sent to parser-cmd (PID 3952):
       # Define b as int, and try to use it as a table: error
       [a]
       b = 1

       [a.b]
       c = 2

     output from parser-cmd (PID 3952) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [a.b] is defined more than once")

     want:
       Exit code 1

FAIL invalid/table/redefine-02
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3957):
       [t1]
       t2.t3.v = 0
       [t1.t2]

     output from parser-cmd (PID 3957) (stdout):
       {
         "t1": {
           "t2": {
             "t3": {
               "v": {"type": "integer", "value": "0"}
             }
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/table/redefine-03
     Expected an error, but no error was reported.

     input sent to parser-cmd (PID 3959):
       [t1]
       t2.t3.v = 0
       [t1.t2.t3]

     output from parser-cmd (PID 3959) (stdout):
       {
         "t1": {
           "t2": {
             "t3": {
               "v": {"type": "integer", "value": "0"}
             }
           }
         }
       }

     want:
       Exit code 1

FAIL invalid/table/super-twice
     exit status 2

     input sent to parser-cmd (PID 3960):
       [a.b]
       [a]
       [a]

     output from parser-cmd (PID 3960) (stderr):
       Fatal error: exception Otoml__Common.Duplicate_key("table [a] is defined more than once")

     want:
       Exit code 1

toml-test v2025-04-23 [./decoder]: using embedded tests
  valid tests: 201 passed,  4 failed
invalid tests: 463 passed, 66 failed

==> ENCODER TESTS
FAIL valid/float/max-int
     Values for key "max_float" differ:
       Expected:     9.007199254740991e+15 (float64)
       Your encoder: 9007199254740991 (int64)

     input sent to parser-cmd (PID 4040):
       {
           "max_float": {"type": "float", "value": "9007199254740991"},
           "min_float": {"type": "float", "value": "-9007199254740991"}
       }

     output from parser-cmd (PID 4040) (stdout):
       max_float = 9007199254740991
       min_float = -9007199254740991

     want:
       # Maximum and minimum safe natural numbers.
       max_float =  9_007_199_254_740_991.0
       min_float = -9_007_199_254_740_991.0

FAIL valid/float/zero
     Values for key "exponent" differ:
       Expected:     0 (float64)
       Your encoder: 0 (int64)

     input sent to parser-cmd (PID 4044):
       {
           "exponent":            {"type": "float", "value": "0"},
           "exponent-signed-neg": {"type": "float", "value": "-0"},
           "exponent-signed-pos": {"type": "float", "value": "0"},
           "exponent-two-0":      {"type": "float", "value": "0"},
           "signed-neg":          {"type": "float", "value": "-0"},
           "signed-pos":          {"type": "float", "value": "0"},
           "zero":                {"type": "float", "value": "0"}
       }

     output from parser-cmd (PID 4044) (stdout):
       exponent = 0
       exponent-signed-neg = -0
       exponent-signed-pos = 0
       "exponent-two-0" = 0
       signed-neg = -0
       signed-pos = 0
       zero = 0

     want:
       zero = 0.0
       signed-pos = +0.0
       signed-neg = -0.0
       exponent = 0e0
       exponent-two-0 = 0e00
       exponent-signed-pos = +0e0
       exponent-signed-neg = -0e0

FAIL valid/inline-table/key-dotted-5
     Could not find key "arr-2" in encoder output

     input sent to parser-cmd (PID 4061):
       {
           "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 (PID 4061) (stdout):
       [["arr-1"]]
         a = {b = 1}
       "arr-2" = ["str", {a = {b = 1}}]

       [["arr-3"]]
         a = {b = 1}

       [["arr-3"]]
         a = {b = 2}
       "arr-4" = ["str", {a = {b = 1}}, {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/inline-table/key-dotted-7
     exit status 2

     input sent to parser-cmd (PID 4064):
       {
           "arr": [{
               "a": {"b": [{
                   "c": {
                       "d": {"type": "integer", "value": "1"}
                   }
               }]}
           }]
       }

     output from parser-cmd (PID 4064) (stderr):
       Fatal error: exception Failure("TOML arrays of tables cannot be formatted out of the parent table context")

     want:
          

FAIL valid/inline-table/spaces
     Values for key "clap-2.nest.b" differ:
       Expected:     9 (float64)
       Your encoder: 9 (int64)

     input sent to parser-cmd (PID 4062):
       {
           "clap-1": {
               "version": {"type": "string", "value": "4"},
               "features": [
                   {"type": "string", "value": "derive"},
                   {"type": "string", "value": "cargo"}
               ]
           },
           "clap-2": {
               "version": {"type": "string", "value": "4"},
               "features": [
                   {"type": "string", "value": "derive"},
                   {"type": "string", "value": "cargo"}
               ],
               "nest": {
                   "a": {"type": "string", "value": "x"},
                   "b": [
                       {"type": "float", "value": "1.5"},
                       {"type": "float", "value": "9"}
                   ]
               }
           }
       }

     output from parser-cmd (PID 4062) (stdout):
       ["clap-1"]
         version = "4"
         features = ["derive", "cargo"]

       ["clap-2"]
         version = "4"
         features = ["derive", "cargo"]

       ["clap-2".nest]
         a = "x"
         b = [1.5, 9]

     want:
       # https://github.com/toml-lang/toml-test/issues/146
       clap-1 = { version = "4"  , features = ["derive", "cargo"] }

       # Contains some literal tabs!
       clap-2 = { version = "4"	   	,	  	features = [   "derive" 	  ,  	  "cargo"   ]   , nest   =   {  	  "a"   =   'x'  , 	  'b'   = [ 1.5    ,   9.0  ]  }  }

FAIL valid/spec-1.0.0/array-of-tables-1
     Could not find key "fruits.physical" in encoder output

     input sent to parser-cmd (PID 4112):
       {
           "fruits": [
               {
                   "name": {"type": "string", "value": "apple"},
                   "physical": {
                       "color": {"type": "string", "value": "red"},
                       "shape": {"type": "string", "value": "round"}
                   },
                   "varieties": [
                       {
                           "name": {"type": "string", "value": "red delicious"}
                       },
                       {
                           "name": {"type": "string", "value": "granny smith"}
                       }
                   ]
               },
               {
                   "name":      {"type": "string", "value": "banana"},
                   "varieties": [{
                       "name": {"type": "string", "value": "plantain"}
                   }]
               }
           ]
       }

     output from parser-cmd (PID 4112) (stdout):
       [[fruits]]
         name = "apple"

       [[fruits.varieties]]
         name = "red delicious"

       [[fruits.varieties]]
         name = "granny smith"
         physical = {color = "red", shape = "round"}

       [[fruits]]
         name = "banana"

       [[fruits.varieties]]
         name = "plantain"

     want:
       [[fruits]]
       name = "apple"

       [fruits.physical]  # subtable
       color = "red"
       shape = "round"

       [[fruits.varieties]]  # nested array of tables
       name = "red delicious"

       [[fruits.varieties]]
       name = "granny smith"


       [[fruits]]
       name = "banana"

       [[fruits.varieties]]
       name = "plantain"

FAIL valid/spec-1.0.0/float-0
     Values for key "flt1" differ:
       Expected:     1 (float64)
       Your encoder: 1 (int64)

     input sent to parser-cmd (PID 4116):
       {
           "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 (PID 4116) (stdout):
       "flt1" = 1
       "flt2" = 3.1415
       "flt3" = -0.01
       "flt4" = 5e+22
       "flt5" = 1e+6
       "flt6" = -0.02
       "flt7" = 6.626e-34

     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/table/array-implicit-and-explicit-after
     Could not find key "a.y" in encoder output

     input sent to parser-cmd (PID 4190):
       {
           "a": {
               "b": [{
                   "x": {"type": "integer", "value": "1"}
               }],
               "y": {"type": "integer", "value": "2"}
           }
       }

     output from parser-cmd (PID 4190) (stdout):
       [a]

       [[a.b]]
         x = 1
         y = 2

     want:
       [[a.b]]
       x = 1

       [a]
       y = 2

toml-test v2025-04-23 [./encoder]: using embedded tests
encoder tests: 197 passed,  8 failed
took 0.0 0.0