diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-08-19 19:12:08 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-08-19 19:12:08 +0200 |
commit | bc8360c70260653491c721a42777440eb7f6ac61 (patch) | |
tree | 37e707c4520422a663cd828e992c94ea2998e9f5 | |
parent | 8590c79b3ad38c982361d15ce7ebc169be1a18e7 (diff) | |
download | org-mode-bc8360c70260653491c721a42777440eb7f6ac61.tar.gz |
Fix failing test
* testing/lisp/test-ob-lob.el (test-ob-lob/call-with-header-arguments):
Fix failing test.
-rw-r--r-- | testing/lisp/test-ob-lob.el | 94 |
1 files changed, 59 insertions, 35 deletions
diff --git a/testing/lisp/test-ob-lob.el b/testing/lisp/test-ob-lob.el index c89c8e9..bb933b4 100644 --- a/testing/lisp/test-ob-lob.el +++ b/testing/lisp/test-ob-lob.el @@ -41,41 +41,65 @@ "Test the evaluation of a library of babel #+call: line." (letf (((symbol-function 'org-babel-insert-result) (symbol-function 'ignore))) - (org-test-at-id "fab7e291-fde6-45fc-bf6e-a485b8bca2f0" - (move-beginning-of-line 1) - (forward-line 6) - (message (buffer-substring (point-at-bol) (point-at-eol))) - (should (string= "testing" (org-babel-execute-src-block - nil (org-babel-lob-get-info)))) - (forward-line 1) - (should (string= "testing" (caar (org-babel-execute-src-block - nil (org-babel-lob-get-info))))) - (forward-line 1) - (should (string= "testing" (org-babel-execute-src-block - nil (org-babel-lob-get-info)))) - (forward-line 1) - (should (string= "testing" (caar (org-babel-execute-src-block - nil (org-babel-lob-get-info))))) - (forward-line 1) - (should (string= "testing" (org-babel-execute-src-block - nil (org-babel-lob-get-info)))) - (forward-line 1) - (should (string= "testing" (caar (org-babel-execute-src-block - nil (org-babel-lob-get-info))))) - (forward-line 1) (beginning-of-line) (forward-char 27) - (should (string= "testing" (org-babel-execute-src-block - nil (org-babel-lob-get-info)))) - (forward-line 1) (beginning-of-line) (forward-char 27) - (should (string= "testing" (caar (org-babel-execute-src-block - nil (org-babel-lob-get-info))))) - (forward-line 1) (beginning-of-line) - (should (= 4 (org-babel-execute-src-block nil (org-babel-lob-get-info)))) - (forward-line 1) - (should (string= "testing" (org-babel-execute-src-block - nil (org-babel-lob-get-info)))) - (forward-line 1) - (should (string= "123" (org-babel-execute-src-block - nil (org-babel-lob-get-info))))))) + (let ((org-babel-library-of-babel + (org-test-with-temp-text-in-file + " +#+name: echo +#+begin_src emacs-lisp :var input=\"echo'd\" + input +#+end_src + +#+name: lob-minus +#+begin_src emacs-lisp :var a=0 :var b=0 + (- a b) +#+end_src" + (org-babel-lob-ingest) + org-babel-library-of-babel))) + (org-test-at-id "fab7e291-fde6-45fc-bf6e-a485b8bca2f0" + (move-beginning-of-line 1) + (forward-line 6) + (message (buffer-substring (point-at-bol) (point-at-eol))) + (should + (string= "testing" (org-babel-execute-src-block + nil (org-babel-lob-get-info)))) + (forward-line 1) + (should + (string= "testing" (caar (org-babel-execute-src-block + nil (org-babel-lob-get-info))))) + (forward-line 1) + (should + (string= "testing" (org-babel-execute-src-block + nil (org-babel-lob-get-info)))) + (forward-line 1) + (should + (string= "testing" (caar (org-babel-execute-src-block + nil (org-babel-lob-get-info))))) + (forward-line 1) + (should + (string= "testing" (org-babel-execute-src-block + nil (org-babel-lob-get-info)))) + (forward-line 1) + (should + (string= "testing" (caar (org-babel-execute-src-block + nil (org-babel-lob-get-info))))) + (forward-line 1) (beginning-of-line) (forward-char 27) + (should + (string= "testing" (org-babel-execute-src-block + nil (org-babel-lob-get-info)))) + (forward-line 1) (beginning-of-line) (forward-char 27) + (should + (string= "testing" (caar (org-babel-execute-src-block + nil (org-babel-lob-get-info))))) + (forward-line 1) (beginning-of-line) + (should + (= 4 (org-babel-execute-src-block nil (org-babel-lob-get-info)))) + (forward-line 1) + (should + (string= "testing" (org-babel-execute-src-block + nil (org-babel-lob-get-info)))) + (forward-line 1) + (should (string= "123" (org-babel-execute-src-block + nil (org-babel-lob-get-info)))))))) (ert-deftest test-ob-lob/export-lob-lines () "Test the export of a variety of library babel call lines." |