Commit | Line | Data |
---|---|---|
0cd0f6f3 AT |
1 | # Overview # |
2 | ||
3 | This folder contains tests for the VVhitespace interpreter (`vvi`). | |
4 | ||
5 | # Instructions # | |
6 | ||
7 | Edit 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 | ||
12 | Build `vvc` and `vvi` in the source tree, if you haven't already. | |
13 | ||
14 | vvs-repo/tests % cd .. && make clean all && cd tests | |
15 | ||
16 | Alternatively, edit the configuration block in `vv_test.py` to provide | |
17 | appropriate paths relative to this `tests` folder. | |
18 | ||
19 | compiler_path = '../vvc' | |
20 | interpreter_path = '../vvi' | |
21 | ||
22 | With configuration now complete, execute the tests via `make test`. A dot will | |
23 | appear for every successfully completed test. For example: | |
24 | ||
25 | vvs-repo/tests % make test | |
26 | Testing vvi: | |
27 | ....................... | |
28 | vvs-repo/tests % | |
29 | ||
30 | If a test should fail, the name of the test will be printed in place of its | |
31 | dot. 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 | ||
42 | If testing is aborted prematurely, say by a Ctrl-C initiated SIGINT, use `make | |
43 | clean` to remove any temporary files. |