diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-09-09 14:21:06 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-09-09 14:31:06 -0600 |
commit | bae8dfed77219bc3133088e171886a0859b03647 (patch) | |
tree | 946ca1cafa161b068672a29cdd1166178fba07ec | |
parent | 8fb588d4d32258936d939151a3c65084ab4f0feb (diff) | |
download | org-mode-bae8dfed77219bc3133088e171886a0859b03647.tar.gz |
Better Org-mode initialization for batch tests.
Thanks to Martyn Jago for this patch.
* testing/org-test.el (org-test-dir): Better Org-mode initialization
for batch tests.
-rw-r--r-- | testing/org-test.el | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/testing/org-test.el b/testing/org-test.el index 331dfa1..a8b5b49 100644 --- a/testing/org-test.el +++ b/testing/org-test.el @@ -24,19 +24,26 @@ ;;;; Code: -(let* ((org-test-dir (expand-file-name +(let ((org-test-dir (expand-file-name (file-name-directory - (or load-file-name buffer-file-name)))) - (load-path (cons - (expand-file-name "ert" org-test-dir) - (cons - (expand-file-name "jump" org-test-dir) - load-path)))) - (require 'ert) - (require 'ert-x) - (require 'jump) - (require 'which-func) - (require 'org)) + (or load-file-name buffer-file-name))))) + (let ((org-lisp-dir (expand-file-name + (concat org-test-dir "../lisp")))) + (unless (member 'features "org") + (setq load-path (cons org-lisp-dir load-path)) + (org-babel-do-load-languages + 'org-babel-load-languages '((sh . t))))) + (let* ((load-path (cons + (expand-file-name "ert" org-test-dir) + (cons + (expand-file-name "jump" org-test-dir) + load-path)))) + (require 'ert) + (require 'ert-x) + (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. |