Manually revert to the Release 7.8.04 tag.
[org-mode/org-mode-NeilSmithlineMods.git] / testing / lisp / test-ob-octave.el
blobe642679f2416d31041280fbbf9cf4d55139c8b14
1 ;;; test-ob-octave.el --- tests for ob-octave.el
3 ;; Copyright (c) 2010-2012 Sergey Litvinov
4 ;; Authors: Sergey Litvinov
6 ;; Released under the GNU General Public License version 3
7 ;; see: http://www.gnu.org/licenses/gpl-3.0.html
8 (org-test-for-executable "octave")
9 (unless (featurep 'ob-octave)
10 (signal 'missing-test-dependency "Support for Octave code blocks"))
12 (ert-deftest ob-octave/input-none ()
13 "Number output"
14 (org-test-at-id "54dcd61d-cf6c-4d7a-b9e5-854953c8a753"
15 (org-babel-next-src-block)
16 (should (= 10 (org-babel-execute-src-block)))))
18 (ert-deftest ob-octave/output-vector ()
19 "Vector output"
20 (org-test-at-id "54dcd61d-cf6c-4d7a-b9e5-854953c8a753"
21 (org-babel-next-src-block 2)
22 (should (equal '((1 2 3 4)) (org-babel-execute-src-block)))))
24 (ert-deftest ob-octave/input-variable ()
25 "Input variable"
26 (org-test-at-id "cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba"
27 (org-babel-next-src-block)
28 (should (= 42 (org-babel-execute-src-block)))))
30 (ert-deftest ob-octave/input-array ()
31 "Input an array"
32 (org-test-at-id "cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba"
33 (org-babel-next-src-block 2)
34 (should (equal '((1 2 3)) (org-babel-execute-src-block)))))
36 (ert-deftest ob-octave/input-matrix ()
37 "Input a matrix"
38 (org-test-at-id "cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba"
39 (org-babel-next-src-block 3)
40 (should (equal '((1 2) (3 4)) (org-babel-execute-src-block)))))
42 (ert-deftest ob-octave/input-string ()
43 "Input a string"
44 (org-test-at-id "cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba"
45 (org-babel-next-src-block 4)
46 (should (equal "te" (org-babel-execute-src-block)))))
48 (ert-deftest ob-octave/input-nil ()
49 "Input elisp nil"
50 (org-test-at-id "cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba"
51 (org-babel-next-src-block 5)
52 (should (equal nil (org-babel-execute-src-block)))))