Manually revert to the Release 7.8.04 tag.
[org-mode.git] / testing / lisp / test-ob-awk.el
blobd925b7b90a51204a0e09f3a6daeeb2a1a8377e63
1 ;;; test-ob-awk.el --- tests for ob-awk.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
9 ;;; Code:
10 (org-test-for-executable "awk")
11 (unless (featurep 'ob-awk)
12 (signal 'missing-test-dependency "Support for Awk code blocks"))
14 (ert-deftest ob-awk/input-none ()
15 "Test with no input file"
16 (org-test-at-id "9e998b2a-3581-43fe-b26d-07d3c507b86a"
17 (org-babel-next-src-block)
18 (should (= 42 (org-babel-execute-src-block)))))
20 (ert-deftest ob-awk/input-src-block ()
21 "Test a code block as an input"
22 (org-test-at-id "9e998b2a-3581-43fe-b26d-07d3c507b86a"
23 (org-babel-next-src-block 2)
24 (should (= 43 (org-babel-execute-src-block)))))
26 (ert-deftest ob-awk/input-src-block ()
27 "Test a code block as an input"
28 (org-test-at-id "9e998b2a-3581-43fe-b26d-07d3c507b86a"
29 (org-babel-next-src-block 3)
30 (should (= 150 (org-babel-execute-src-block)))))