diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2010-10-04 19:36:39 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2010-10-05 11:54:48 -0600 |
commit | 41cde9d9bd7ce6510636b70447545dc0ebb0cbc9 (patch) | |
tree | 7bbc70a104ffd9cd9b7713c0d50876761d425a00 | |
parent | d6143f1e7aab7c9fe610f63625ee77d5314c65dd (diff) | |
download | org-mode-41cde9d9bd7ce6510636b70447545dc0ebb0cbc9.tar.gz |
test: re-arranging example files into their own directory
-rw-r--r-- | testing/examples/example-file-no-header.org (renamed from testing/example-file-no-header.org) | 0 | ||||
-rw-r--r-- | testing/examples/link-in-heading.org | 10 | ||||
-rw-r--r-- | testing/examples/normal.org (renamed from testing/example-file.org) | 0 | ||||
-rw-r--r-- | testing/lisp/test-ob-exp.el | 8 | ||||
-rw-r--r-- | testing/org-test.el | 16 |
5 files changed, 24 insertions, 10 deletions
diff --git a/testing/example-file-no-header.org b/testing/examples/example-file-no-header.org index 24d7c08..24d7c08 100644 --- a/testing/example-file-no-header.org +++ b/testing/examples/example-file-no-header.org diff --git a/testing/examples/link-in-heading.org b/testing/examples/link-in-heading.org new file mode 100644 index 0000000..1b235a2 --- /dev/null +++ b/testing/examples/link-in-heading.org @@ -0,0 +1,10 @@ +this file has a link in it's heading, which can cause problems + +* [[http://www.example.com][example]] + +what a weird heading... + +#+begin_src emacs-lisp + ;; a8b1d111-eca8-49f0-8930-56d4f0875155 + (message "my heading has a link") +#+end_src diff --git a/testing/example-file.org b/testing/examples/normal.org index af6e4ea..af6e4ea 100644 --- a/testing/example-file.org +++ b/testing/examples/normal.org diff --git a/testing/lisp/test-ob-exp.el b/testing/lisp/test-ob-exp.el index b71b200..b0b562b 100644 --- a/testing/lisp/test-ob-exp.el +++ b/testing/lisp/test-ob-exp.el @@ -18,17 +18,15 @@ ;;; Tests (ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-headers () "Testing export without any headlines in the org-mode file." - (org-test-in-example-file org-test-no-header-example-file-name + (org-test-in-example-file org-test-no-header-file ;; export the file to html (org-export-as-html nil) ;; should create a .html file (should (file-exists-p (concat - (file-name-sans-extension - org-test-no-header-example-file-name) + (file-name-sans-extension org-test-no-header-file) ".html"))) ;; should not create a file with "::" appended to it's name - (should-not (file-exists-p - (concat org-test-no-header-example-file-name "::"))))) + (should-not (file-exists-p (concat org-test-no-header-file "::"))))) (ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-file () "Testing export from buffers which are not visiting any file." diff --git a/testing/org-test.el b/testing/org-test.el index 9d1b5a6..82d9542 100644 --- a/testing/org-test.el +++ b/testing/org-test.el @@ -56,11 +56,17 @@ org-test searches this directory up the directory tree.") (defconst org-base-dir (expand-file-name ".." org-test-dir)) -(defconst org-test-example-file-name - (expand-file-name "example-file.org" org-test-dir)) +(defconst org-test-example-dir + (expand-file-name "examples" org-test-dir)) -(defconst org-test-no-header-example-file-name - (expand-file-name "example-file-no-header.org" org-test-dir)) +(defconst org-test-file + (expand-file-name "normal.org" org-test-example-dir)) + +(defconst org-test-no-header-file + (expand-file-name "no-header.org" org-test-dir)) + +(defconst org-test-link-in-heading-file + (expand-file-name "link-in-heading.org" org-test-dir)) (defconst test-org-code-block-anchor "94839181-184f-4ff4-a72f-94214df6f5ba") @@ -80,7 +86,7 @@ currently executed.") (defmacro org-test-in-example-file (file &rest body) "Execute body in the Org-mode example file." (declare (indent 1)) - `(let* ((my-file (or ,file org-test-example-file-name)) + `(let* ((my-file (or ,file org-test-file)) (visited-p (get-file-buffer my-file)) to-be-removed) (save-window-excursion |