diff --git a/docs/TESTS.md b/docs/TESTS.md index 43f8bd5d..c32717a1 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -12,4 +12,21 @@ As you make changes to the solution you are writing use your editor's functional Remember to evaluate `(exercise-name-test:run-tests)` to re-run the tests after loading your updated solution. +## Testing from the command line +Executing the tests from the command line is possible, but it depends on which Common Lisp implementation you have chosen. +For example, with SBCL you could execute this in the directory for exercise "foo" + +```sh +sbcl --noinform \ + --load foo-test \ + --eval '(exit :code (if (foo-test:run-tests) 0 1))' +``` + +Other Common Lisp implementations will have similar but slightly different command-line options and exit commands. + +This assumes you have already installed SBCL and Quicklisp. +See [Installing Common Lisp locally](https://exercism.org/docs/tracks/common-lisp/installation) + +That command is somewhat unwieldy. +A method to wrap that into the `exercism` CLI is [shown here](https://glennj.github.io/exercism/cli).