Commit c8f9bd14 authored by Juergen Nickelsen's avatar Juergen Nickelsen

print not only names, but also filenames of failed tests

parent 6fbc002b
(debug t)
(defvar the-alist '((3 . 4)
(7 . 5)
(lala . humdi)
......
......@@ -15,25 +15,25 @@ the evaluation of FORM and VALUE are equal."
(if (atom result)
(progn (format out "Test FAIL: %s RAISED ERROR: %s\n"
name *last-error*)
(push name fails))
(push (cons name test-file) fails))
(let ((resultvalue (princs (car result))))
(if (eq resultvalue target)
(format out "Test pass: %s\t%s\n" name resultvalue)
(format out "Test FAIL: %s\n calculated: %s\n expected: %s\n"
name resultvalue target)
(push name fails))))))
(push (cons name test-file) fails))))))
(testcmp 'testcmp ''lala "lala") ;check if the *testing* works
(let ((files (or *ARGS* (glob-filenames (string-concat testdir
"/[0-9]*.lisp")))))
(format t "load files: %s\n" (princs files))
(dolist (f files)
(format out "\nloading %s\n" f)
(load f)))
(dolist (test-file files)
(format out "\nloading %s\n" test-file)
(load test-file)))
(format t "%d tests, %d FAILS" ntests (length fails))
(dolist (err (reverse fails))
(format t " \"%s\"" err))
(format t " \"%s:%s\"" (cdr err) (car err)))
(terpri)
(when fails
(exit 1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment