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:
       [[parent-table.arr]]
       [[parent-table.arr]]
       [parent-table]
       not-arr = 1

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

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

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/array/extending-table
     exit status 2

     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):
       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-1
     exit status 2

     input sent to parser-cmd:
       # INVALID TOML DOC
       fruit = []

       [[fruit]] # Not allowed

     output from parser-cmd (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-2
     exit status 2

     input sent to parser-cmd:
       # 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 (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:
       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/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/inline-table/duplicate-key-1
     exit status 2

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

     output from parser-cmd (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-2
     exit status 2

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

     output from parser-cmd (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-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/duplicate-key-4
     exit status 2

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

     output from parser-cmd (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:
       a.b=0
       # Since table "a" is already defined, it can't be replaced by an inline table.
       a={}

     output from parser-cmd (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:
       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/overwrite-03
     exit status 2

     input sent to parser-cmd:
       a = { b = 1 }
       a.b = 2

     output from parser-cmd (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:
       inline-t = { nest = {} }

       [[inline-t.nest]]

     output from parser-cmd (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:
       inline-t = { nest = {} }

       [inline-t.nest]

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

     want:
       Exit code 1

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

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

     output from parser-cmd (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:
       tab = { inner.table = [{}], inner.table.val = "bad" }

     output from parser-cmd (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:
       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/inline-table/overwrite-09
     exit status 2

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

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

     output from parser-cmd (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:
       # 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 (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-1
     exit status 2

     input sent to parser-cmd:
       a = false
       a.b = true

     output from parser-cmd (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-2
     exit status 2

     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):
       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-1
     exit status 2

     input sent to parser-cmd:
       name = "Tom"
       name = "Pradyun"

     output from parser-cmd (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-2
     exit status 2

     input sent to parser-cmd:
       dupe = false
       dupe = true

     output from parser-cmd (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-3
     exit status 2

     input sent to parser-cmd:
       spelling   = "favorite"
       "spelling" = "favourite"

     output from parser-cmd (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-4
     exit status 2

     input sent to parser-cmd:
       spelling   = "favorite"
       'spelling' = "favourite"

     output from parser-cmd (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/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-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/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/spec/inline-table-3-0
     exit status 2

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

     output from parser-cmd (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/table-9-0
     Expected an error, but no error was reported.

     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 (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/table-9-1
     Expected an error, but no error was reported.

     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 (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-3
     Expected an error, but no error was reported.

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

     output from parser-cmd (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:
       bad-uni-esc-4 = "val\U0000"

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

     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/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/duplicate
     exit status 2

     input sent to parser-cmd:
       [a]
       b = 1

       [a]
       c = 2

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

     want:
       Exit code 1

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

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

       [[fruit.apple]]

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

     want:
       Exit code 1

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

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

       [fruit.apple] # INVALID

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

     want:
       Exit code 1

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

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

       [fruit.apple.taste] # INVALID

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

     want:
       Exit code 1

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

     input sent to parser-cmd:
       [fruit]
       type = "apple"

       [fruit.type]
       apple = "yes"

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

     want:
       Exit code 1

FAIL invalid/table/duplicate-table-array
     exit status 2

     input sent to parser-cmd:
       [tbl]
       [[tbl]]

     output from parser-cmd (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-table-array2
     exit status 2

     input sent to parser-cmd:
       [[tbl]]
       [tbl]

     output from parser-cmd (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/overwrite-array-in-parent
     exit status 2

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

     output from parser-cmd (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:
       a=true
       [[a]]

     output from parser-cmd (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:
       a=1
       [a.b.c.d]

     output from parser-cmd (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-1
     exit status 2

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

       [a.b]
       c = 2

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

     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

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

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

     output from parser-cmd (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:
       [a.b]
       [a]
       [a]

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

     want:
       Exit code 1

toml-test v2024-05-31 [./src/ocaml-otoml/decoder]: using embedded tests
  valid tests: 181 passed,  1 failed
invalid tests: 319 passed, 52 failed

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

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

     output from parser-cmd (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:
       {
           "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 (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:
       {
           "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-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:
       {
           "arr": [{
               "a": {"b": [{
                   "c": {
                       "d": {"type": "integer", "value": "1"}
                   }
               }]}
           }]
       }

     output from parser-cmd (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:
       {
           "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 (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/array-of-tables-1
     Could not find key "fruits.physical" in encoder output

     input sent to parser-cmd:
       {
           "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 (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/float-0
     Values for key "flt1" differ:
       Expected:     1 (float64)
       Your encoder: 1 (int64)

     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
       "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:
       {
           "a": {
               "b": [{
                   "x": {"type": "integer", "value": "1"}
               }],
               "y": {"type": "integer", "value": "2"}
           }
       }

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

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

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

       [a]
       y = 2

toml-test v2024-05-31 [./src/ocaml-otoml/encoder]: using embedded tests
encoder tests: 174 passed,  8 failed
took 0.0 0.0