toml/test1
Martin Tournoij 5221b3d3d6
Fix toml_json.c output (#85)
* Fix toml_json.c output

There were two issues; partly related to changes in upstream toml-test:

- Use appropriate type for local date and times.

- The arrays would get printed as:

      {"type": "array", "value": [...the values...]}

  But this should just be:

      [...the values...]

  It also wouldn't print mixed arrays because 'm' was missing in the
  switch; I adapted this from toml_cat.c.

Before:

	toml-test [./toml_json]: using embedded tests: 328 passed, 87 failed

After:

	toml-test [./toml_json]: using embedded tests: 351 passed, 64 failed

The remaining test failures look like a few minor issues in toml.c,
rather than toml_json.c

* Also fix the "test1" toml-test runner
2023-09-30 12:36:59 -07:00
..
extra v0.5 compliant 2019-10-08 16:58:18 -07:00
.gitignore v0.5 compliant 2019-10-08 16:58:18 -07:00
build.sh Fix toml_json.c output (#85) 2023-09-30 12:36:59 -07:00
README.md updated 2021-04-11 15:24:10 -07:00
run.sh Fix toml_json.c output (#85) 2023-09-30 12:36:59 -07:00

How to run the tests

% bash build.sh
% bash run.sh
Test: array-mixed-types-arrays-and-ints (invalid)

Expected an error, but no error was reported.
-------------------------------------------------------------------------------
Test: array-mixed-types-ints-and-floats (invalid)

Expected an error, but no error was reported.
-------------------------------------------------------------------------------
Test: array-mixed-types-strings-and-ints (invalid)

Expected an error, but no error was reported.

129 passed, 3 failed

Note: toml version 1.0 allows mixed types in arrays.