1 ;;; test-ob-scheme.el --- Tests for Babel scheme -*- lexical-binding: t; -*-
3 ;; Copyright (C) 2017 Nicolas Goaziou
5 ;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
7 ;; This program is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation, either version 3 of the License, or
10 ;; (at your option) any later version.
12 ;; This program is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
22 ;; Unit tests for Org Babel Scheme.
26 (unless (featurep 'ob-scheme
)
27 (signal 'missing-test-dependency
"Support for Scheme code blocks"))
29 (ert-deftest test-ob-scheme
/tables
()
31 (equal "#+begin_src scheme
38 (org-test-with-temp-text "#+begin_src scheme\n'(1 2 3)\n#+end_src"
39 (org-babel-execute-maybe)
42 (ert-deftest test-ob-scheme
/prologue
()
43 "Test :prologue parameter."
45 (equal "#+begin_src scheme :prologue \"(define x 2)\"
52 (org-test-with-temp-text
53 "#+begin_src scheme :prologue \"(define x 2)\"\nx\n#+end_src"
54 (org-babel-execute-maybe)
58 "#+begin_src scheme :prologue \"(define x 2)\" :var y=1
65 (org-test-with-temp-text
66 "#+begin_src scheme :prologue \"(define x 2)\" :var y=1\nx\n#+end_src"
67 (org-babel-execute-maybe)
70 (ert-deftest test-ob-scheme
/unspecified
()
71 "Test <#unspecified> return value."
73 (equal "#+begin_src scheme
81 (org-test-with-temp-text
86 (org-babel-execute-maybe)
90 (provide 'test-ob-scheme
)
91 ;;; test-ob-scheme.el ends here