Updates to `tests/` for release. Mostly adding comments and improving the README.
[vvhitespace] / tests / README.md
CommitLineData
0cd0f6f3
AT
1# Overview #
2
3This folder contains tests for the VVhitespace interpreter (`vvi`).
4
5# Instructions #
6
7Edit the shebang in `vv_test.py` to match your environment. For example:
8
9 FreeBSD 12: #!/usr/local/bin/python3.6
10 Debian 9 : #!/usr/bin/python3
11
12Build `vvc` and `vvi` in the source tree, if you haven't already.
13
14 vvs-repo/tests % cd .. && make clean all && cd tests
15
16Alternatively, edit the configuration block in `vv_test.py` to provide
17appropriate paths relative to this `tests` folder.
18
19 compiler_path = '../vvc'
20 interpreter_path = '../vvi'
21
22With configuration now complete, execute the tests via `make test`. A dot will
23appear for every successfully completed test. For example:
24
25 vvs-repo/tests % make test
26 Testing vvi:
27 .......................
28 vvs-repo/tests %
29
30If a test should fail, the name of the test will be printed in place of its
31dot. For example, with an induced failure in the division command:
32
33 vvs-repo/tests % make test
34 Testing vvi:
35 ........
36 2004_arithmetic_division
37 Expected: A
38 Received: A113
39 ..............
40 vvs-repo/tests %
41
42If testing is aborted prematurely, say by a Ctrl-C initiated SIGINT, use `make
43clean` to remove any temporary files.