Skip to content

Commit

Permalink
Instructions to run tests from the command line (#758)
Browse files Browse the repository at this point in the history
* Instructions to run tests from the command line

* Remove shell wrapper note.
CL -> Common Lisp
  • Loading branch information
glennj authored Nov 1, 2023
1 parent e8ddbf7 commit 8493ca2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

0 comments on commit 8493ca2

Please sign in to comment.