guile-toml/test/README.org

30 lines
1.0 KiB
Org Mode
Raw Normal View History

2022-12-30 17:54:24 +00:00
#+title: guile-toml tests
* toml-test suite
To run the ~toml-test~ suite, install ~toml-test~ by following the instructions [[https://github.com/BurntSushi/toml-test/#installation][here]]. Running the tests also depends on [[https://github.com/aconchillo/guile-json][guile-json]], so make sure to have it installed.
To test the decoder, run:
#+begin_src shell
$ toml-test ./test-decoder.scm
#+end_src
To test the encoder, run:
#+begin_src shell
$ toml-test -encoder ./test-encoder.scm
#+end_src
* 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.
2023-01-03 22:46:10 +00:00
To run the tests for the decoder:
2023-01-03 22:47:56 +00:00
#+begin_src shell
$ guile test-datatypes.scm
2023-01-03 22:46:10 +00:00
#+end_src
2022-12-30 17:54:24 +00:00
2023-01-03 22:46:10 +00:00
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.