guile-toml/test
2023-01-03 23:47:56 +01:00
..
decoder.scm nit: formatting of decoder 2022-12-30 18:53:44 +01:00
encoder.scm feat: add decoder.scm and encoder.scm for testing 2022-12-30 18:28:15 +01:00
README.org docs: fix shell command 2023-01-03 23:47:56 +01:00
test-datatypes.scm test: add tests for decoder datatypes 2023-01-03 23:35:46 +01:00
test-decoder.scm refactor: move test-decoder 2022-12-30 17:53:13 +01:00
test-encoder.scm feat(encoder): float 2022-12-30 17:53:13 +01:00

guile-toml tests

toml-test suite

To run the toml-test suite, install toml-test by following the instructions here. Running the tests also depends on guile-json, so make sure to have it installed.

To test the decoder, run:

$ toml-test ./test-decoder.scm

To test the encoder, run:

$ toml-test -encoder ./test-encoder.scm

tests for Guile's datatypes

The toml-test suite tests TOML's structure extensively, but since it relies on JSON and a different encoding of values, we still need to test whether Guile's datatypes are decoded and encoded correctly.

To run the tests for the decoder:

$ guile test-datatypes.scm

The files decoder.scm and encoder.scm serve as manual testing utilities:

  • decoder.scm takes TOML input from STDIN and outputs pretty-printed SCM to STDOUT.
  • encoder.scm takes JSON input from STDIN and outputs TOML to STDOUT.