basic-toml version 0.1.4
FAIL valid/array/array
     Error: Error { message: "invalid number at line 5 column 3" }
 
     Exit 1

     input sent to parser-cmd:
       ints = [1, 2, 3, ]
       floats = [1.1, 2.1, 3.1]
       strings = ["a", "b", "c"]
       dates = [
         1987-07-05T17:45:00Z,
         1979-05-27T07:32:00Z,
         2006-06-01T11:00:00Z,
       ]
       comments = [
                1,
                2, #this is ok
       ]

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 5 column 3" }

       Exit 1

     want:
          

FAIL valid/comment/everywhere
     Error: Error { message: "invalid number at line 27 column 6" }
 
     Exit 1

     input sent to parser-cmd:
       # Top comment.
         # Top comment.
       # Top comment.

       # [no-extraneous-groups-please]

       [group] # Comment
       answer = 42 # Comment
       # no-extraneous-keys-please = 999
       # Inbetween comment.
       more = [ # Comment
         # What about multiple # comments?
         # Can you handle it?
         #
                 # Evil.
       # Evil.
         42, 42, # Comments within arrays are fun.
         # What about multiple # comments?
         # Can you handle it?
         #
                 # Evil.
       # Evil.
       # ] Did I fool you?
       ] # Hopefully not.

       # Make sure the space between the datetime and "#" isn't lexed.
       dt = 1979-05-27T07:32:12-07:00  # c
       d = 1979-05-27 # Comment

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 27 column 6" }

       Exit 1

     want:
          

FAIL valid/datetime/datetime
     Error: Error { message: "invalid number at line 1 column 9" }
 
     Exit 1

     input sent to parser-cmd:
       space = 1987-07-05 17:45:00Z

       # ABNF is case-insensitive, both "Z" and "z" must be supported.
       lower = 1987-07-05t17:45:00z

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 9" }

       Exit 1

     want:
          

FAIL valid/datetime/edge
     Error: Error { message: "invalid number at line 1 column 17" }
 
     Exit 1

     input sent to parser-cmd:
       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 (stderr):
       Error: Error { message: "invalid number at line 1 column 17" }

       Exit 1

     want:
          

FAIL valid/datetime/leap-year
     Error: Error { message: "invalid number at line 1 column 23" }
 
     Exit 1

     input sent to parser-cmd:
       2000-datetime       = 2000-02-29 15:15:15Z
       2000-datetime-local = 2000-02-29 15:15:15
       2000-date           = 2000-02-29

       2024-datetime       = 2024-02-29 15:15:15Z
       2024-datetime-local = 2024-02-29 15:15:15
       2024-date           = 2024-02-29

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 23" }

       Exit 1

     want:
          

FAIL valid/datetime/local
     Error: Error { message: "invalid number at line 1 column 9" }
 
     Exit 1

     input sent to parser-cmd:
       local = 1987-07-05T17:45:00
       milli = 1977-12-21T10:32:00.555
       space = 1987-07-05 17:45:00

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 9" }

       Exit 1

     want:
          

FAIL valid/datetime/local-date
     Error: Error { message: "invalid number at line 1 column 15" }
 
     Exit 1

     input sent to parser-cmd:
       bestdayever = 1987-07-05

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 15" }

       Exit 1

     want:
          

FAIL valid/datetime/local-time
     Error: Error { message: "expected newline, found a colon at line 1 column 18" }
 
     Exit 1

     input sent to parser-cmd:
       besttimeever = 17:45:00
       milliseconds = 10:32:00.555

     output from parser-cmd (stderr):
       Error: Error { message: "expected newline, found a colon at line 1 column 18" }

       Exit 1

     want:
          

FAIL valid/datetime/milliseconds
     Error: Error { message: "invalid number at line 1 column 9" }
 
     Exit 1

     input sent to parser-cmd:
       utc1  = 1987-07-05T17:45:56.123Z
       utc2  = 1987-07-05T17:45:56.6Z
       wita1 = 1987-07-05T17:45:56.123+08:00
       wita2 = 1987-07-05T17:45:56.6+08:00

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 9" }

       Exit 1

     want:
          

FAIL valid/datetime/timezone
     Error: Error { message: "invalid number at line 1 column 8" }
 
     Exit 1

     input sent to parser-cmd:
       utc  = 1987-07-05T17:45:56Z
       pdt  = 1987-07-05T17:45:56-05:00
       nzst = 1987-07-05T17:45:56+12:00
       nzdt = 1987-07-05T17:45:56+13:00  # DST

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 8" }

       Exit 1

     want:
          

FAIL valid/example
     Error: Error { message: "invalid number at line 1 column 17" }
 
     Exit 1

     input sent to parser-cmd:
       best-day-ever = 1987-07-05T17:45:00Z

       [numtheory]
       boring = false
       perfection = [6, 28, 496]

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 17" }

       Exit 1

     want:
          

FAIL valid/spec-example-1
     Error: Error { message: "invalid number at line 7 column 7" }
 
     Exit 1

     input sent to parser-cmd:
       # This is a TOML document. Boom.

       title = "TOML Example"

       [owner]
       name = "Lance Uppercut"
       dob = 1979-05-27T07:32:00-08:00 # First class dates? Why not?

       [database]
       server = "192.168.1.1"
       ports = [ 8001, 8001, 8002 ]
       connection_max = 5000
       enabled = true

       [servers]

         # You can indent as you please. Tabs or spaces. TOML don't care.
         [servers.alpha]
         ip = "10.0.0.1"
         dc = "eqdc10"

         [servers.beta]
         ip = "10.0.0.2"
         dc = "eqdc10"

       [clients]
       data = [ ["gamma", "delta"], [1, 2] ]

       # Line breaks are OK when inside arrays
       hosts = [
         "alpha",
         "omega"
       ]

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 7 column 7" }

       Exit 1

     want:
          

FAIL valid/spec-example-1-compact
     Error: Error { message: "invalid number at line 5 column 5" }
 
     Exit 1

     input sent to parser-cmd:
       #Useless spaces eliminated.
       title="TOML Example"
       [owner]
       name="Lance Uppercut"
       dob=1979-05-27T07:32:00-08:00#First class dates
       [database]
       server="192.168.1.1"
       ports=[8001,8001,8002]
       connection_max=5000
       enabled=true
       [servers]
       [servers.alpha]
       ip="10.0.0.1"
       dc="eqdc10"
       [servers.beta]
       ip="10.0.0.2"
       dc="eqdc10"
       [clients]
       data=[["gamma","delta"],[1,2]]
       hosts=[
       "alpha",
       "omega"
       ]

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 5 column 5" }

       Exit 1

     want:
          

FAIL valid/spec/local-date-0
     Error: Error { message: "invalid number at line 1 column 7" }
 
     Exit 1

     input sent to parser-cmd:
       ld1 = 1979-05-27

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 7" }

       Exit 1

     want:
          

FAIL valid/spec/local-date-time-0
     Error: Error { message: "invalid number at line 1 column 8" }
 
     Exit 1

     input sent to parser-cmd:
       ldt1 = 1979-05-27T07:32:00
       ldt2 = 1979-05-27T00:32:00.999

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 8" }

       Exit 1

     want:
          

FAIL valid/spec/local-time-0
     Error: Error { message: "invalid number at line 1 column 8" }
 
     Exit 1

     input sent to parser-cmd:
       lt1 = 07:32:00
       lt2 = 00:32:00.999

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 8" }

       Exit 1

     want:
          

FAIL valid/spec/offset-date-time-0
     Error: Error { message: "invalid number at line 1 column 8" }
 
     Exit 1

     input sent to parser-cmd:
       odt1 = 1979-05-27T07:32:00Z
       odt2 = 1979-05-27T00:32:00-07:00
       odt3 = 1979-05-27T00:32:00.999-07:00

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 8" }

       Exit 1

     want:
          

FAIL valid/spec/offset-date-time-1
     Error: Error { message: "invalid number at line 1 column 8" }
 
     Exit 1

     input sent to parser-cmd:
       odt4 = 1979-05-27 07:32:00Z

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 1 column 8" }

       Exit 1

     want:
          

FAIL valid/spec/table-7
     Error: Error { message: "invalid number at line 8 column 16" }
 
     Exit 1

     input sent to parser-cmd:
       # Top-level table begins.
       name = "Fido"
       breed = "pug"

       # Top-level table ends.
       [owner]
       name = "Regina Dogman"
       member_since = 1999-08-04

     output from parser-cmd (stderr):
       Error: Error { message: "invalid number at line 8 column 16" }

       Exit 1

     want:
          

FAIL valid/spec/table-9
     Error: Error { message: "duplicate key: `apple` for key `fruit` at line 8 column 8" }
 
     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):
       Error: Error { message: "duplicate key: `apple` for key `fruit` at line 8 column 8" }

       Exit 1

     want:
          

FAIL valid/table/array-within-dotted
     Error: Error { message: "duplicate key: `apple` for key `fruit` at line 4 column 9" }
 
     Exit 1

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

       [[fruit.apple.seeds]]
       size = 2

     output from parser-cmd (stderr):
       Error: Error { message: "duplicate key: `apple` for key `fruit` at line 4 column 9" }

       Exit 1

     want:
          

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/integer/positive-bin
     Expected an error, but no error was reported.

     input sent to parser-cmd:
       positive-bin = +0b11010110

     output from parser-cmd (stdout):
       {
         "positive-bin": {"type": "integer", "value": "214"}
       }

     want:
       Exit code 1

FAIL invalid/integer/positive-hex
     Expected an error, but no error was reported.

     input sent to parser-cmd:
       positive-hex = +0xff

     output from parser-cmd (stdout):
       {
         "positive-hex": {"type": "integer", "value": "255"}
       }

     want:
       Exit code 1

FAIL invalid/integer/positive-oct
     Expected an error, but no error was reported.

     input sent to parser-cmd:
       positive-oct = +0o755

     output from parser-cmd (stdout):
       {
         "positive-oct": {"type": "integer", "value": "493"}
       }

     want:
       Exit code 1

toml-test v2024-05-31 [./scripts/target/release/basic-toml-decoder]: using embedded tests
  valid tests: 161 passed, 21 failed
invalid tests: 367 passed,  4 failed

==> ENCODER TESTS
(not supported)
took 0.7 0.29