Idris2/tests
Mathew Polzin 4bedaac811
[ fix ] make color output toggling simpler and also more robust. (#2848)
* make color output toggling simpler and also more robust

* don't unintentionally assert that tests are run in an environment where colors are turned on.

* Update src/Idris/Env.idr
2023-01-22 13:35:57 -06:00
..
allbackends [ cleanup ] Remove extraneous show and simplify printLn (#2618) 2022-08-10 21:22:58 +01:00
allschemes [ fix ] also usleep in the producer of channels006 to guarantee correct output (#2702) 2022-10-05 12:03:20 +01:00
base [ prelude ] Add lacking implementation of Traversable for Pair 2023-01-09 15:56:21 +00:00
chez [ test ] for io_bind inlining 2022-12-06 11:55:28 +00:00
codegen [ perf ] manually eta-expand unsaturated io_bind calls (#2785) 2022-12-01 15:31:00 +00:00
contrib Add test case for lexer issue and fix other instance. 2022-09-05 13:47:41 -07:00
gambit/bitops001 Add Data.Bits to base (#1033) 2021-03-04 20:59:56 +00:00
ideMode [ performance ] More stack safety in the Prelude (#2704) 2022-10-26 09:54:53 +01:00
idris2 [ fix ] make color output toggling simpler and also more robust. (#2848) 2023-01-22 13:35:57 -06:00
node [ performance ] More stack safety in the Prelude (#2704) 2022-10-26 09:54:53 +01:00
prelude [ prelude ] Add Range implementation for Char (#2505) 2022-05-27 07:57:59 +01:00
racket Move channel tests to allschemes 2022-10-04 10:24:27 +02:00
refc [ perf ] manually eta-expand unsaturated io_bind calls (#2785) 2022-12-01 15:31:00 +00:00
templates [ new ] put TTC files in a version-tagged directory (#2684) 2022-11-01 18:11:18 +00:00
ttimp [ new ] put TTC files in a version-tagged directory (#2684) 2022-11-01 18:11:18 +00:00
typedd-book [ refactor ] Abstract Prelude.elem to work with all Foldables (#2294) 2022-02-01 21:34:29 +00:00
vmcode/basic001 Move rm -rf to the beginning of the test 2021-07-13 22:54:53 +01:00
Main.idr Fix at-pattern leak in recursive with blocks (#2834) 2022-12-28 09:08:09 +00:00
Makefile [ repl ] Add the ability to get detailed help, e.g. :help :help (#2722) 2022-10-21 14:35:33 +02:00
README.md [ re #2649 ] Describe test naming pattern 2022-11-11 09:33:09 +01:00
tests.ipkg Set PREFIX for tests 2021-04-19 11:23:58 +01:00

Tests

Note: The commands listed in this section should be run from the repository's root folder.

Run all tests: make test

To run only a subset of the tests use: make test only=NAME. NAME is matched against the path to each test case.

Examples:

  • make test only=chez will run all Chez Scheme tests.
  • make test only=ttimp/basic will run all basic tests for TTImp.
  • make test only=idris2/basic001 will run a specific test.

Templates for common test instances can be found in the templates folder.

There is no defined naming convention for adding tests, but the pattern has been:

  • a sub-directory in the relevant test section (idris2, refc, etc.)
  • with a descriptive name followed by a 3-digit number (e.g. envflags001 is the first test checking the environment flags functions)
  • containing:
    • an Idris file importing the relevant modules and containing the test function(s)
    • a run file which is a shell script that runs the test (see the existing tests for examples for this)
    • an expected file containing the expected output