* To run all tests against a single implementation:
```
-make test^IMPL
+make "test^IMPL"
# e.g.
-make test^clojure
-make test^js
+make "test^clojure"
+make "test^js"
```
* To run tests for a single step against all implementations:
```
-make test^stepX
+make "test^stepX"
# e.g.
-make test^step2
-make test^step7
+make "test^step2"
+make "test^step7"
```
* To run tests for a specific step against a single implementation:
```
-make test^IMPL^stepX
+make "test^IMPL^stepX"
# e.g
-make test^ruby^step3
-make test^ps^step4
+make "test^ruby^step3"
+make "test^ps^step4"
```
### Self-hosted functional tests
as the test implementation and use the `MAL_IMPL` make variable
to change the underlying host language (default is JavaScript):
```
-make MAL_IMPL=IMPL test^mal^step2
+make MAL_IMPL=IMPL "test^mal^step2"
# e.g.
-make test^mal^step2 # js is default
-make MAL_IMPL=ruby test^mal^step2
-make MAL_IMPL=python test^mal^step2
+make "test^mal^step2" # js is default
+make MAL_IMPL=ruby "test^mal^step2"
+make MAL_IMPL=python "test^mal^step2"
```
* To run performance tests against a single implementation:
```
-make perf^IMPL
+make "perf^IMPL"
# e.g.
-make perf^js
+make "perf^js"
```
* To run performance tests against all implementations:
```
-make perf
+make "perf"
```
### Generating language statistics
* To report line and byte statistics for a single implementation:
```
-make stats^IMPL
+make "stats^IMPL"
# e.g.
-make stats^js
+make "stats^js"
```
* To report line and bytes statistics for general Lisp code (env, core
and stepA):
```
-make stats-lisp^IMPL
+make "stats-lisp^IMPL"
# e.g.
-make stats-lisp^js
+make "stats-lisp^js"
```
## Docker test environment
You can also specify a command to run within the container. For
example, to run step2 tests for every implementation (except MATLAB):
```bash
-./tests/docker-run.sh make SKIP_IMPLS="matlab" test^step2
+./tests/docker-run.sh make SKIP_IMPLS="matlab" "test^step2"
```
**Notes**:
* Your implementation needs to be complete enough to self-host. This
means that all the tests should pass in both direct and self-hosted modes:
```bash
- make test^[IMPL_NAME]
- make MAL_IMPL=[IMPL_NAME] test^mal
+ make "test^[IMPL_NAME]"
+ make MAL_IMPL=[IMPL_NAME] "test^mal"
```
You do not need to pass the final optional tests for stepA that are
marked as optional and not needed for self-hosting.
This allows you to run tests against your implementation like this:
```
-make test^quux^stepX
+make "test^quux^stepX"
```
does input and output in a way that can be captured by the test
harness. Go to the top level and run the following:
```
-make test^quux^step0
+make "test^quux^step0"
```
Add and then commit your new `step0_repl.qx` and `Makefile` to git.
the full suite of step 1 tests. Go to the top level and run the
following:
```
-make test^quux^step1
+make "test^quux^step1"
```
Fix any test failures related to symbols, numbers and lists.
Now go to the top level, run the step 2 tests and fix the errors.
```
-make test^quux^step2
+make "test^quux^step2"
```
You now have a simple prefix notation calculator!
Now go to the top level, run the step 3 tests and fix the errors.
```
-make test^quux^step3
+make "test^quux^step3"
```
You mal implementation is still basically just a numeric calculator
strings should be able to pass now.
```
-make test^quux^step4
+make "test^quux^step4"
```
Your mal implementation is already beginning to look like a real
Now go to the top level, run the step 5 tests.
```
-make test^quux^step5
+make "test^quux^step5"
```
Look at the step 5 test file `tests/step5_tco.mal`. The `sum-to`
Now go to the top level, run the step 6 tests. The optional tests will
need support from the reader for comments, vectors and hash-maps:
```
-make test^quux^step6
+make "test^quux^step6"
```
Congratulations, you now have a full-fledged scripting language that
Now go to the top level, run the step 7 tests:
```
-make test^quux^step7
+make "test^quux^step7"
```
Quoting is one of the more mundane functions available in mal, but do
Now go to the top level, run the step 8 tests:
```
-make test^quux^step8
+make "test^quux^step8"
```
There is a reasonably good chance that the macro tests will not pass
Now go to the top level, run the step 9 tests:
```
-make test^quux^step9
+make "test^quux^step9"
```
Your mal implementation is now essentially a fully featured Lisp
Now go to the top level, run the step A tests:
```
-make test^quux^stepA
+make "test^quux^stepA"
```
Once you have passed all the non-optional step A tests, it is time to
Once you can manually run all the self-hosted steps, it is time to run
all the tests in self-hosted mode:
```
-make MAL_IMPL=quux test^mal
+make MAL_IMPL=quux "test^mal"
```
When you run into problems (which you almost certainly will), use the