Skip to content

Commit 8493ca2

Browse files
authored
Instructions to run tests from the command line (#758)
* Instructions to run tests from the command line * Remove shell wrapper note. CL -> Common Lisp
1 parent e8ddbf7 commit 8493ca2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/TESTS.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,21 @@ As you make changes to the solution you are writing use your editor's functional
1212

1313
Remember to evaluate `(exercise-name-test:run-tests)` to re-run the tests after loading your updated solution.
1414

15+
## Testing from the command line
1516

17+
Executing the tests from the command line is possible, but it depends on which Common Lisp implementation you have chosen.
18+
For example, with SBCL you could execute this in the directory for exercise "foo"
19+
20+
```sh
21+
sbcl --noinform \
22+
--load foo-test \
23+
--eval '(exit :code (if (foo-test:run-tests) 0 1))'
24+
```
25+
26+
Other Common Lisp implementations will have similar but slightly different command-line options and exit commands.
27+
28+
This assumes you have already installed SBCL and Quicklisp.
29+
See [Installing Common Lisp locally](https://exercism.org/docs/tracks/common-lisp/installation)
30+
31+
That command is somewhat unwieldy.
32+
A method to wrap that into the `exercism` CLI is [shown here](https://glennj.github.io/exercism/cli).

0 commit comments

Comments
 (0)