1 ;;; test-ob-emacs-lisp.el
3 ;; Copyright (c) 2012, 2013 Free Software Foundation, Inc.
4 ;; Authors: Eric Schulte, Martyn Jago
6 ;; This file is not part of GNU Emacs.
8 ;; This program is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation, either version 3 of the License, or
11 ;; (at your option) any later version.
13 ;; This program is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ;; Org-mode tests for ob-emacs-lisp.el live here
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
31 (org-babel-next-src-block)
33 (should (re-search-forward "results:" nil t
))
38 (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))
39 (org-test-with-temp-text-in-file "
40 #+begin_src emacs-lisp
44 (org-babel-next-src-block)
46 (should (re-search-forward "results:" nil t
))
51 (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
53 (ert-deftest ob-emacs-lisp
/commented-last-block-line-with-var
()
54 (org-test-with-temp-text-in-file "
55 #+begin_src emacs-lisp :var a=1
58 (org-babel-next-src-block)
60 (re-search-forward "results" nil t
)
64 (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
66 (ert-deftest ob-emacs-lisp
/commented-last-block-line
()
67 (org-test-with-temp-text-in-file "
68 #+begin_src emacs-lisp :var a=2
71 (org-babel-next-src-block)
73 (re-search-forward "results" nil t
)
77 (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
79 (provide 'test-ob-emacs-lisp
)
81 ;;; test-ob-emacs-lisp.el ends here