From: ueno Date: Sat, 27 Nov 2004 00:27:56 +0000 (+0000) Subject: * test/lunit.el: Update copyright year. X-Git-Tag: riece-1_0_6~16 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12617012dee3759fa16964f70fd6ba9d6d7b78de;p=elisp%2Friece.git * test/lunit.el: Update copyright year. (lunit-test-result-run): Fixed the argument of lunit-test-listener-error listener. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 32bfc7c..636fa6c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-11-27 Daiki Ueno + + * test/lunit.el: Update copyright year. + (lunit-test-result-run): Fixed the argument of + lunit-test-listener-error listener. + 2004-11-26 Daiki Ueno * COMPILE (riece-test): Require 'lunit after when ./test is added diff --git a/lisp/test/lunit.el b/lisp/test/lunit.el index 89b4c6a..d166740 100644 --- a/lisp/test/lunit.el +++ b/lisp/test/lunit.el @@ -1,6 +1,6 @@ ;;; lunit.el --- simple testing framework for luna -;; Copyright (C) 2000 Daiki Ueno. +;; Copyright (C) 2000-2004 Daiki Ueno. ;; Author: Daiki Ueno ;; Keywords: OOP, XP @@ -128,7 +128,7 @@ (nconc (lunit-test-result-errors-internal result) (list (cons case (cdr error))))) (lunit-test-result-notify - result 'lunit-test-listener-error case error))) + result 'lunit-test-listener-error case (cdr error)))) (lunit-test-result-set-assert-count-internal result (+ (lunit-test-result-assert-count-internal result) @@ -329,6 +329,24 @@ signal an error if not." "))))))) +(defun batch-lunit () + (let ((load-path (cons (expand-file-name (car command-line-args-left)) + (cons nil load-path))) + (files (directory-files (expand-file-name (car command-line-args-left)) + t "^test-.*\\.el$")) + suite) + (setq suite (lunit-make-test-suite)) + (while files + (when (file-regular-p (car files)) + (load-file (car files)) + (lunit-test-suite-add-test + suite + (lunit-make-test-suite-from-class + (intern (file-name-sans-extension + (file-name-nondirectory (car files))))))) + (setq files (cdr files))) + (lunit suite))) + (provide 'lunit) ;;; lunit.el ends here