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
16 (let ((load-path (cons (expand-file-name
17 ".." (file-name-directory
18 (or load-file-name buffer-file-name
)))
21 (require 'org-test-ob-consts
))
26 (ert-deftest ob-emacs-lisp
/commented-last-block-line-no-var
()
27 (org-test-with-temp-text-in-file "
28 #+begin_src emacs-lisp
32 (org-babel-next-src-block)
34 (should (re-search-forward "results:" nil t
))
39 (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
40 (org-test-with-temp-text-in-file "
41 #+begin_src emacs-lisp
46 (org-babel-next-src-block)
48 (should (re-search-forward "results:" nil t
))
53 (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
55 (ert-deftest ob-emacs-lisp
/commented-last-block-line-with-var
()
56 (org-test-with-temp-text-in-file "
57 #+begin_src emacs-lisp :var a=1
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 (org-test-with-temp-text-in-file "
69 #+begin_src emacs-lisp :var a=2
73 (org-babel-next-src-block)
75 (re-search-forward "results" nil t
)
79 (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
80 (provide 'test-ob-emacs-lisp
)
82 ;;; test-ob-emacs-lisp.el ends here