CL-TEST-MORE is inspired by Test::More, a module of Perl.
The advantages of CL-TEST-MORE are:
(plan 9)
;; check if first argument is true
(ok (eq got expected) "Description")
;; check if "got" equals "expected"
(is got expected "Description")
(isnt got expected "Description")
;; with :test function
(is got expected "Description" :test #'string=)
;; rather than print *standard-output* "# This is just a comment\n"
(diag "This is just a comment")
;; macro expansion
(is-expand (got macro) (expected :like "this") "Description")
;; output
(is-print (write-line "aiueo") "aiueo\n" "Description")
;; functions always pass or fail
(pass "Description")
(fail "Description")
(finalize)
(ql:quickload :cl-test-more)
(asdf-install:install "http://github.com/fukamachi/cl-test-more/tarball/master")
ok
is
isnt
diag
is-expand
is-print
is-error
is-type
like
skip
pass
fail
deftest
run-test
run-test-all
$ alisp -#! filename.lisp
$ sbcl --script filename.lisp
$ cmucl -load filename.lisp -eval '(quit)'
$ ccl --load filename.lisp --eval '(quit)'
$ ecl -shell filename.lisp
$ clisp filename.lisp
CL-TEST-MORE is almost written in portable Common Lisp code.
But, a feature, tests as a script is only supported Allegro CL, SBCL, CMUCL, Clozure CL, ECL and CLISP.
If you use other implementation, you have to put (finalize)
at the end of file.
Please report any bugs to e.arrows@gmail.com, or post an issue to GitHub.
Copyright (c) 2010-2011 Eitarow Fukamachi <e.arrows@gmail.com>
CL-TEST-MORE is freely distributable under the MIT License (http://www.opensource.org/licenses/mit-license).