org-clone-subtree-with-time-shift: Fix SHIFT check
[org-mode.git] / testing / lisp / test-ob-header-arg-defaults.el
bloba78909161682bbeee52df373e5c80b6f13539905
1 ;;; test-ob-header-arg-defaults.el --- tests for default header args from properties
3 ;; Copyright (c) 2013, 2014 Achim Gratz
4 ;; Authors: Achim Gratz
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 ;;; Code:
23 (ert-deftest test-ob-header-arg-defaults/global/call ()
24 (org-test-at-id "3fdadb69-5d15-411e-aad0-f7860cdd7816"
25 (org-babel-next-src-block 1)
26 (forward-line -1)
27 (should (equal "ge1/gh2/--3/ge4/ge5/--6/--7/--8/--9"
28 (org-babel-execute-src-block nil (org-babel-lob-get-info))))))
30 (ert-deftest test-ob-header-arg-defaults/global/noweb ()
31 (org-test-at-id "3fdadb69-5d15-411e-aad0-f7860cdd7816"
32 (org-babel-next-src-block 1)
33 (should (equal "ge1/gh2/--3/ge4/ge5/--6/--7"
34 (org-babel-execute-src-block)))))
36 (ert-deftest test-ob-header-arg-defaults/tree/overwrite/call ()
37 (should
38 (equal "ge1/gh2/--3/ge4/ge5/--6/th7/te8/--9"
39 (org-test-at-id "a9cdfeda-9f31-4bb5-b694-2cf452f07dfd"
40 (org-babel-next-src-block 1)
41 (forward-line -1)
42 (org-babel-execute-src-block nil (org-babel-lob-get-info))))))
44 (ert-deftest test-ob-header-arg-defaults/tree/overwrite/noweb ()
45 (should
46 (equal "--1/--2/--3/--4/--5/--6/th7/te8/--9"
47 (org-test-at-id "a9cdfeda-9f31-4bb5-b694-2cf452f07dfd"
48 (org-babel-next-src-block 1)
49 (org-babel-execute-src-block)))))
51 (ert-deftest test-ob-header-arg-defaults/tree/accumulate/call ()
52 (should
53 (equal "ge1/th2/th3/ge4/te5/--6"
54 (org-test-at-id "1d97d258-fd50-4107-a095-e4625bffc57b"
55 (org-babel-next-src-block 1)
56 (forward-line -1)
57 (org-babel-execute-src-block nil (org-babel-lob-get-info))))))
59 (ert-deftest test-ob-header-arg-defaults/tree/accumulate/noweb ()
60 (should
61 (equal "ge1/th2/th3/ge4/te5/--6/--7/--8"
62 (org-test-at-id "1d97d258-fd50-4107-a095-e4625bffc57b"
63 (org-babel-next-src-block 1)
64 (org-babel-execute-src-block)))))
66 (ert-deftest test-ob-header-arg-defaults/tree/complex/call ()
67 (should
68 (equal "gh1/th2/--3/gh4/te5/--6"
69 (org-test-at-id "fa0e912d-d9b4-47b0-9f9e-1cbb39f7cbc2"
70 (org-babel-next-src-block 1)
71 (forward-line -1)
72 (org-babel-execute-src-block nil (org-babel-lob-get-info))))))
74 (ert-deftest test-ob-header-arg-defaults/tree/complex/noweb ()
75 (should
76 (equal "gh1/th2/--3/gh4/te5/--6/--7/--8/--9"
77 (org-test-at-id "fa0e912d-d9b4-47b0-9f9e-1cbb39f7cbc2"
78 (org-babel-next-src-block 1)
79 (org-babel-execute-src-block)))))
81 (provide 'test-ob-header-arg-defaults)
83 ;;; test-ob-header-arg-defaults.el ends here