Skip to content

Commit

Permalink
updated for new lisp-unit
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbysmith007 committed Oct 16, 2012
1 parent 7493290 commit e948e3c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions tests/setup.lisp
Expand Up @@ -48,19 +48,21 @@
)))

(defun run-tests (&key suites tests (use-debugger T))
(let* ((*package* (find-package :cl-mediawiki-test))
(let* ((*package* (find-package :buildnode-test))
(lisp-unit:*print-failures* t)
(lisp-unit:*print-errors* t)
(lisp-unit::*use-debugger* use-debugger)
(tests (append (alexandria:ensure-list tests)
(loop for suite in (alexandria:ensure-list suites)
appending (get suite :tests))))
(out (with-output-to-string (*standard-output*)
(lisp-unit::run-test-thunks
(lisp-unit::get-test-thunks
(if (null tests)
(get-tests *package*)
tests))))))

appending (get suite :tests))))
(actual-std-out *standard-output*)
(out (with-output-to-string (s)
(let ((*standard-output*
(make-broadcast-stream s actual-std-out)))
(if (null tests)
(lisp-unit::%run-all-thunks)
(lisp-unit::%run-thunks tests))))))
(format *standard-output*
"~&~% ** TEST RESULTS: Cl-Mediawiki ** ~%-----------~%~A~%------ END TEST RESULTS ------~%"
out)))
"~&~% ** TEST RESULTS: CL-MEDIAWIKI ** ~%-----------~%~A~%------ END TEST RESULTS ------~%"
out)))

0 comments on commit e948e3c

Please sign in to comment.