Fix global dynamic variables prefixes in org-mouse.el.
[org-mode/org-mode-NeilSmithlineMods.git] / testing / lisp / test-ob-C.el
blobdfadedb265baf8b34a7f07f08f7c45955ec0d8b6
1 (require 'ob-C)
3 (ert-deftest ob-C/assert ()
4 (should t))
6 (ert-deftest ob-C/simple-program ()
7 "Hello world program."
8 (org-test-at-id "fa6db330-e960-4ea2-ac67-94bb845b8577"
9 (org-babel-next-src-block)
10 (should (= 42 (org-babel-execute-src-block)))))
12 (ert-deftest ob-C/integer-var ()
13 "Test of an integer variable."
14 (org-test-at-id "fa6db330-e960-4ea2-ac67-94bb845b8577"
15 (org-babel-next-src-block 2)
16 (should (= 12 (org-babel-execute-src-block)))))
18 (ert-deftest ob-C/two-integer-var ()
19 "Test of two input variables"
20 (org-test-at-id "fa6db330-e960-4ea2-ac67-94bb845b8577"
21 (org-babel-next-src-block 3)
22 (should (= 22 (org-babel-execute-src-block)))))
24 (ert-deftest ob-C/string-var ()
25 "Test of a string input variable"
26 (org-test-at-id "fa6db330-e960-4ea2-ac67-94bb845b8577"
27 (org-babel-next-src-block 4)
28 (should (equal "word 4" (org-babel-execute-src-block)))))
30 (ert-deftest ob-C/preprocessor ()
31 "Test of a string variable"
32 (org-test-at-id "fa6db330-e960-4ea2-ac67-94bb845b8577"
33 (org-babel-next-src-block 5)
34 (should (= 42 (org-babel-execute-src-block)))))
36 (ert-deftest ob-C/table ()
37 "Test of a table output"
38 :expected-result :failed
39 (org-test-at-id "2df1ab83-3fa3-462a-a1f3-3aef6044a874"
40 (org-babel-next-src-block)
41 (should (equal '((1) (2)) (org-babel-execute-src-block)))))
43 ;;; test-ob-C.el ends here