The preferred Lisp package for writing simple unit tests is lisp-unit.

Running existing tests

Just do

,r-l-s ROS_SYSTEM_TO_TEST asdf-system-to-test-tests

The asdf system for tests usually has either the -tests suffix, or -test suffix.

And then:

,!p asdf-system-to-test-tests
(run-tests my-define-tests-function-name)

That's all.

Writing unit tests for your functions

TODO: here should go a link with some testing tutorial

FiveAM If lisp-unit isn't expressive enough for you, consider using FiveAM. To run tests written with FiveAM (1) load the tests asdf package, (2) change to the corresponding Lisp package in the REPL and (3) execute (run!). If (run!) doesn't do anything automatically, try specifying the test suite name: (run! 'MY_TEST_SUITE_NAME). You can find the name by rgrep-ing (def-suite in your ASDF package.