summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartyn Jago <martyn.jago@btinternet.com>2011-09-12 16:50:28 +0100
committerEric Schulte <schulte.eric@gmail.com>2011-09-12 10:37:25 -0600
commit7f62b224af99e507d8bb3852e5b6d720be389934 (patch)
tree3a9c0c81b59956b1fae0a3cc3cfd97c007e3e18a
parentc019c31bad9063addea47f0519698f13fb6437fc (diff)
downloadorg-mode-7f62b224af99e507d8bb3852e5b6d720be389934.tar.gz
Remove jump.el dependency from test execution * testing/org-test.el: Remove jump.el dependency from test execution removing the need for a user to install git submodules
-rw-r--r--testing/org-test.el23
1 files changed, 14 insertions, 9 deletions
diff --git a/testing/org-test.el b/testing/org-test.el
index a8b5b49..136a287 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -16,11 +16,13 @@
;; called while in a `defun' all ert tests with names matching the
;; name of the function are run.
-;;; Prerequisites:
-
-;; ERT and jump.el are both included as git submodules, install with
-;; $ git submodule init
-;; $ git submodule update
+;;; Test Development
+;; For test development purposes a number of navigation and test
+;; function construction routines are available as a git submodule
+;; (jump.el)
+;; Install with...
+;; $ git submodule init
+;; $ git submodule update
;;;; Code:
@@ -38,13 +40,15 @@
(cons
(expand-file-name "jump" org-test-dir)
load-path))))
+ (require 'cl)
(require 'ert)
(require 'ert-x)
- (require 'jump)
- (require 'which-func)
+ (when (file-exists-p
+ (expand-file-name "jump/jump.el" org-test-dir))
+ (require 'jump)
+ (require 'which-func))
(require 'org)))
-
(defconst org-test-default-test-file-name "tests.el"
"For each defun a separate file with tests may be defined.
tests.el is the fallback or default if you like.")
@@ -136,6 +140,7 @@ files."
;;; Navigation Functions
+(when (featurep 'jump)
(defjump org-test-jump
(("lisp/\\1.el" . "testing/lisp/test-\\1.el")
("lisp/\\1.el" . "testing/lisp/\\1.el/test.*.el")
@@ -178,7 +183,7 @@ files."
" (should-error (error \"errr...\")))\n\n\n"
"(provide '" name ")\n\n"
";;; " file-name " ends here\n") full-path))
- (lambda () ((lambda (res) (if (listp res) (car res) res)) (which-function))))
+ (lambda () ((lambda (res) (if (listp res) (car res) res)) (which-function)))))
(define-key emacs-lisp-mode-map "\M-\C-j" 'org-test-jump)