1
1
mirror of https://github.com/idris-lang/Idris2.git synced 2024-12-24 20:23:11 +03:00
Idris2/tests
2023-10-16 09:43:22 +01:00
..
allbackends Add testing utilities script 2023-09-07 14:57:22 +01:00
allschemes Remove trivial testing input files 2023-09-07 14:57:22 +01:00
base [ base ] Add a bridge between MonadState and Ref 2023-10-13 13:47:31 +01:00
chez Group tests by directory 2023-09-07 14:57:22 +01:00
codegen Remove trivial testing input files 2023-09-07 14:57:22 +01:00
contrib [ re ] Move existing test to an appropriate category 2023-10-01 07:16:20 +01:00
gambit/bitops001 Add testing utilities script 2023-09-07 14:57:22 +01:00
ideMode Add testing utilities script 2023-09-07 14:57:22 +01:00
idris2 [ fix ] Prevent relative path traversal in elaborator scripts 2023-10-16 09:43:22 +01:00
node Group tests by directory 2023-09-07 14:57:22 +01:00
prelude Remove trivial testing input files 2023-09-07 14:57:22 +01:00
racket Group tests by directory 2023-09-07 14:57:22 +01:00
refc Add testing utilities script 2023-09-07 14:57:22 +01:00
templates Add testing utilities script 2023-09-07 14:57:22 +01:00
ttimp Add testing utilities script 2023-09-07 14:57:22 +01:00
typedd-book Add testing utilities script 2023-09-07 14:57:22 +01:00
vmcode/basic001 Add testing utilities script 2023-09-07 14:57:22 +01:00
Main.idr [ fix ] Make traverse and friends lazy for LazyList 2023-09-25 19:51:17 +01:00
Makefile [ repl ] Add the ability to get detailed help, e.g. :help :help () 2022-10-21 14:35:33 +02:00
README.md [ re ] 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
testutils.sh [ test ] Set IDRIS2_PREFIX to a local dir when testing 2023-10-04 14:34:03 +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