Update copyright years again.
[org-mode/org-tableheadings.git] / testing / lisp / test-ob-emacs-lisp.el
blobf771ee35be7dcd4ac7abfda3c0a29f79d4a9fbf0
1 ;;; test-ob-emacs-lisp.el
3 ;; Copyright (c) 2012, 2013, 2014 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/>.
21 ;;; Comments:
23 ;; Org-mode tests for ob-emacs-lisp.el live here
25 ;;; Code:
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
30 #+end_src"
31 (org-babel-next-src-block)
32 (org-ctrl-c-ctrl-c)
33 (should (re-search-forward "results:" nil t))
34 (forward-line)
35 (should
36 (string=
38 (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))
39 (org-test-with-temp-text-in-file "
40 #+begin_src emacs-lisp
41 \"some text\";;
42 #+end_src"
44 (org-babel-next-src-block)
45 (org-ctrl-c-ctrl-c)
46 (should (re-search-forward "results:" nil t))
47 (forward-line)
48 (should
49 (string=
50 ": some text"
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
57 #+end_src"
58 (org-babel-next-src-block)
59 (org-ctrl-c-ctrl-c)
60 (re-search-forward "results" nil t)
61 (forward-line)
62 (should (string=
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
69 2;;
70 #+end_src"
71 (org-babel-next-src-block)
72 (org-ctrl-c-ctrl-c)
73 (re-search-forward "results" nil t)
74 (forward-line)
75 (should (string=
76 ": 2"
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