org.el (org-options-keywords): Add "STYLE:"
[org-mode.git] / testing / lisp / test-property-inheritance.el
bloba68d7c6aa9ff2c29b2b92a0868864cb42f9dec2b
1 ;;; test-ob-R.el --- tests for ob-R.el
3 ;; Copyright (c) 2011-2012 Eric Schulte
4 ;; Authors: Eric Schulte
6 ;; Released under the GNU General Public License version 3
7 ;; see: http://www.gnu.org/licenses/gpl-3.0.html
9 ;;; Code:
10 (defmacro test-org-in-property-buffer (&rest body)
11 `(with-temp-buffer
12 (insert-file-contents (expand-file-name "property-inheritance.org"
13 org-test-example-dir))
14 (org-mode)
15 ,@body))
16 (def-edebug-spec test-org-in-property-buffer (body))
18 (ert-deftest test-org-property-accumulation-top-use ()
19 (test-org-in-property-buffer
20 (goto-char (point-min))
21 (org-babel-next-src-block 1)
22 (should (equal 3 (org-babel-execute-src-block)))))
24 (ert-deftest test-org-property-accumulation-top-val ()
25 (test-org-in-property-buffer
26 (goto-char (point-min))
27 (org-babel-next-src-block 2)
28 (should (string= "foo=1 bar=2" (org-babel-execute-src-block)))))
30 (ert-deftest test-org-property-accumulation-overwrite-use ()
31 (test-org-in-property-buffer
32 (goto-char (point-min))
33 (org-babel-next-src-block 3)
34 (should (= 7 (org-babel-execute-src-block)))))
36 (ert-deftest test-org-property-accumulation-overwrite-val ()
37 (test-org-in-property-buffer
38 (goto-char (point-min))
39 (org-babel-next-src-block 4)
40 (should (string= "foo=7" (org-babel-execute-src-block)))))
42 (ert-deftest test-org-property-accumulation-append-use ()
43 (test-org-in-property-buffer
44 (goto-char (point-min))
45 (org-babel-next-src-block 5)
46 (should (= 6 (org-babel-execute-src-block)))))
48 (ert-deftest test-org-property-accumulation-append-val ()
49 (test-org-in-property-buffer
50 (goto-char (point-min))
51 (org-babel-next-src-block 6)
52 (should (string= "foo=1 bar=2 baz=3" (org-babel-execute-src-block)))))
54 (provide 'test-ob-R)
56 ;;; test-ob-R.el ends here