1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

fixed `org-test-load' so that is recursively loads all test files

This commit is contained in:
Eric Schulte 2010-10-03 19:03:41 -06:00
parent e694d1fe39
commit 271d1bb986

View File

@ -127,12 +127,16 @@ currently executed.")
;;; Load and Run tests
(defun org-load-tests ()
(defun org-test-load ()
"Load up the org-mode test suite."
(interactive)
(mapc (lambda (file) (load-file file))
(directory-files (expand-file-name "lisp" org-test-dir)
'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el")))
(flet ((rload (base)
(mapc
(lambda (path)
(if (file-directory-p path) (rload path) (load-file path)))
(directory-files base 'full
"^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el"))))
(rload (expand-file-name "lisp" org-test-dir))))
(defun org-test-current-defun ()
"Test the current function."
@ -143,7 +147,7 @@ currently executed.")
"Run all defined tests matching \"^org\".
Load all test files first."
(interactive)
(org-load-tests)
(org-test-load)
(ert "^org"))
(provide 'org-test)