diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-09-11 14:35:13 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-09-11 14:43:32 -0600 |
commit | f1fcc592fd9eadeed2daeb2bc10a0de590459306 (patch) | |
tree | abfb9ee1aa4056d55737363ac46113d904d69b7f | |
parent | f78f29ebeafc493be066b4ff4114ed582c323dc9 (diff) | |
download | org-mode-f1fcc592fd9eadeed2daeb2bc10a0de590459306.tar.gz |
re-wrapped test to prevent failure during batch execution
* testing/lisp/test-ob.el (test-org-babel/inline-src-blocks):
Re-wrapped test to prevent failure during batch execution.
-rw-r--r-- | testing/lisp/test-ob.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el index ecce41f..d516798 100644 --- a/testing/lisp/test-ob.el +++ b/testing/lisp/test-ob.el @@ -204,13 +204,15 @@ (ert-deftest test-org-babel/inline-src-blocks () (org-test-at-id "54cb8dc3-298c-4883-a933-029b3c9d4b18" - (flet ((next () - (move-end-of-line 1) - (re-search-forward org-babel-inline-src-block-regexp nil t) - (goto-char (match-beginning 1)))) - (next) (should (equal 1 (org-babel-execute-src-block))) - (next) (should (equal 2 (org-babel-execute-src-block))) - (next) (should (equal 3 (org-babel-execute-src-block)))))) + (macrolet ((at-next (&rest body) + `(progn + (move-end-of-line 1) + (re-search-forward org-babel-inline-src-block-regexp nil t) + (goto-char (match-beginning 1)) + (save-match-data ,@body)))) + (at-next (should (equal 1 (org-babel-execute-src-block)))) + (at-next (should (equal 2 (org-babel-execute-src-block)))) + (at-next (should (equal 3 (org-babel-execute-src-block))))))) (ert-deftest test-org-babel/org-babel-get-inline-src-block-matches () (org-test-at-id "0D0983D4-DE33-400A-8A05-A225A567BC74" |