1 ;;; test-ob-emacs-lisp.el
3 ;; Copyright (c) 2012 Free Software Foundation, Inc.
4 ;; Authors: Eric Schulte, Martyn Jago
6 ;; Released under the GNU General Public License version 3
7 ;; see: http://www.gnu.org/licenses/gpl-3.0.html
11 ;; Org-mode tests for ob-emacs-lisp.el live here
14 (ert-deftest ob-emacs-lisp
/commented-last-block-line-no-var
()
15 (org-test-with-temp-text-in-file "
16 #+begin_src emacs-lisp
20 (org-babel-next-src-block)
22 (should (re-search-forward "results:" nil t
))
27 (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
28 (org-test-with-temp-text-in-file "
29 #+begin_src emacs-lisp
34 (org-babel-next-src-block)
36 (should (re-search-forward "results:" nil t
))
41 (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
43 (ert-deftest ob-emacs-lisp
/commented-last-block-line-with-var
()
44 (org-test-with-temp-text-in-file "
45 #+begin_src emacs-lisp :var a=1
49 (org-babel-next-src-block)
51 (re-search-forward "results" nil t
)
55 (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
56 (org-test-with-temp-text-in-file "
57 #+begin_src emacs-lisp :var a=2
61 (org-babel-next-src-block)
63 (re-search-forward "results" nil t
)
67 (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
68 (provide 'test-ob-emacs-lisp
)
70 ;;; test-ob-emacs-lisp.el ends here