cleaning headers of test files -- removing loads and requires
This commit is contained in:
parent
58be118602
commit
3234811c49
|
@ -1,5 +1,15 @@
|
||||||
(require 'ob-C)
|
;;; test-ob-awk.el --- tests for ob-awk.el
|
||||||
|
|
||||||
|
;; Copyright (c) 2010-2012 Sergey Litvinov
|
||||||
|
;; Authors: Sergey Litvinov
|
||||||
|
|
||||||
|
;; Released under the GNU General Public License version 3
|
||||||
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
(unless (featurep 'ob-C)
|
||||||
|
(signal 'missing-test-dependency "Support for C code blocks"))
|
||||||
|
|
||||||
(ert-deftest ob-C/assert ()
|
(ert-deftest ob-C/assert ()
|
||||||
(should t))
|
(should t))
|
||||||
|
|
||||||
|
|
|
@ -6,18 +6,12 @@
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
(org-test-for-executable "R")
|
(org-test-for-executable "R")
|
||||||
(unless (featurep 'ess)
|
(unless (featurep 'ess)
|
||||||
(signal 'missing-test-dependency "ESS"))
|
(signal 'missing-test-dependency "ESS"))
|
||||||
|
(unless (featurep 'ob-R)
|
||||||
(let ((load-path (cons (expand-file-name
|
(signal 'missing-test-dependency "Support for R code blocks"))
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(require 'ob-R)
|
|
||||||
|
|
||||||
(ert-deftest test-ob-R/simple-session ()
|
(ert-deftest test-ob-R/simple-session ()
|
||||||
(org-test-with-temp-text
|
(org-test-with-temp-text
|
||||||
|
|
|
@ -6,16 +6,10 @@
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
(org-test-for-executable "awk")
|
(org-test-for-executable "awk")
|
||||||
|
(unless (featurep 'ob-awk)
|
||||||
(let ((load-path (cons (expand-file-name
|
(signal 'missing-test-dependency "Support for Awk code blocks"))
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(require 'ob-awk)
|
|
||||||
|
|
||||||
(ert-deftest ob-awk/input-none ()
|
(ert-deftest ob-awk/input-none ()
|
||||||
"Test with no input file"
|
"Test with no input file"
|
||||||
|
|
|
@ -10,19 +10,7 @@
|
||||||
|
|
||||||
;; Org-mode tests for ob-emacs-lisp.el live here
|
;; Org-mode tests for ob-emacs-lisp.el live here
|
||||||
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(let ((load-path (cons (expand-file-name
|
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Tests
|
|
||||||
|
|
||||||
(ert-deftest ob-emacs-lisp/commented-last-block-line-no-var ()
|
(ert-deftest ob-emacs-lisp/commented-last-block-line-no-var ()
|
||||||
(org-test-with-temp-text-in-file "
|
(org-test-with-temp-text-in-file "
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
|
@ -10,17 +10,7 @@
|
||||||
|
|
||||||
;; Template test file for Org-mode tests
|
;; Template test file for Org-mode tests
|
||||||
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(let ((load-path (cons (expand-file-name
|
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Tests
|
|
||||||
(ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-headers ()
|
(ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-headers ()
|
||||||
"Testing export without any headlines in the org-mode file."
|
"Testing export without any headlines in the org-mode file."
|
||||||
(let ((html-file (concat (file-name-sans-extension org-test-no-heading-file)
|
(let ((html-file (concat (file-name-sans-extension org-test-no-heading-file)
|
||||||
|
|
|
@ -6,30 +6,10 @@
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
(org-test-for-executable "gfortran")
|
(org-test-for-executable "gfortran")
|
||||||
|
(unless (featurep 'ob-fortran)
|
||||||
(let ((load-path (cons (expand-file-name
|
(signal 'missing-test-dependency "Support for Fortran code blocks"))
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(let ((load-path (cons (expand-file-name
|
|
||||||
"langs"
|
|
||||||
(expand-file-name
|
|
||||||
"babel"
|
|
||||||
(expand-file-name
|
|
||||||
"contrib"
|
|
||||||
(expand-file-name
|
|
||||||
".."
|
|
||||||
(expand-file-name
|
|
||||||
".."
|
|
||||||
(file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))))))
|
|
||||||
load-path)))
|
|
||||||
|
|
||||||
(require 'ob-fortran))
|
|
||||||
|
|
||||||
(ert-deftest ob-fortran/assert ()
|
(ert-deftest ob-fortran/assert ()
|
||||||
(should t))
|
(should t))
|
||||||
|
|
|
@ -6,14 +6,9 @@
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
(let ((load-path (cons (expand-file-name
|
;;; Code:
|
||||||
".." (file-name-directory
|
(unless (featurep 'ob-lilypond)
|
||||||
(or load-file-name buffer-file-name)))
|
(signal 'missing-test-dependency "Support for Lilypond code blocks"))
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(require 'ob-lilypond)
|
|
||||||
|
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(set-buffer (get-buffer-create "test-ob-lilypond.el"))
|
(set-buffer (get-buffer-create "test-ob-lilypond.el"))
|
||||||
|
|
|
@ -5,31 +5,9 @@
|
||||||
|
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
(org-test-for-executable "maxima")
|
(org-test-for-executable "maxima")
|
||||||
|
(unless (featurep 'ob-maxima)
|
||||||
(let ((load-path (cons (expand-file-name
|
(signal 'missing-test-dependency "Support for Maxima code blocks"))
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(let ((load-path (cons (expand-file-name
|
|
||||||
"langs"
|
|
||||||
(expand-file-name
|
|
||||||
"babel"
|
|
||||||
(expand-file-name
|
|
||||||
"contrib"
|
|
||||||
(expand-file-name
|
|
||||||
".."
|
|
||||||
(expand-file-name
|
|
||||||
".."
|
|
||||||
(file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))))))
|
|
||||||
load-path)))
|
|
||||||
|
|
||||||
(require 'ob-maxima))
|
|
||||||
|
|
||||||
(ert-deftest ob-maxima/assert ()
|
(ert-deftest ob-maxima/assert ()
|
||||||
(should t))
|
(should t))
|
||||||
|
|
|
@ -5,17 +5,9 @@
|
||||||
|
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
(org-test-for-executable "octave")
|
(org-test-for-executable "octave")
|
||||||
|
(unless (featurep 'ob-octave)
|
||||||
(let ((load-path (cons (expand-file-name
|
(signal 'missing-test-dependency "Support for Octave code blocks"))
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(require 'ob-octave)
|
|
||||||
|
|
||||||
(ert-deftest ob-octave/input-none ()
|
(ert-deftest ob-octave/input-none ()
|
||||||
"Number output"
|
"Number output"
|
||||||
|
|
|
@ -6,16 +6,10 @@
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
(org-test-for-executable "python")
|
(org-test-for-executable "python")
|
||||||
|
(unless (featurep 'ob-python)
|
||||||
(let ((load-path (cons (expand-file-name
|
(signal 'missing-test-dependency "Support for Python code blocks"))
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(require 'ob-python)
|
|
||||||
|
|
||||||
(ert-deftest test-ob-python/colnames-yes-header-argument ()
|
(ert-deftest test-ob-python/colnames-yes-header-argument ()
|
||||||
(org-test-with-temp-text "#+name: eg
|
(org-test-with-temp-text "#+name: eg
|
||||||
|
|
|
@ -8,17 +8,10 @@
|
||||||
|
|
||||||
;; Template test file for Org-mode tests
|
;; Template test file for Org-mode tests
|
||||||
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(let ((load-path (cons (expand-file-name
|
(unless (featurep 'ob-sh)
|
||||||
".." (file-name-directory
|
(signal 'missing-test-dependency "Support for Sh code blocks"))
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Tests
|
|
||||||
(ert-deftest test-ob-sh/dont-insert-spaces-on-expanded-bodies ()
|
(ert-deftest test-ob-sh/dont-insert-spaces-on-expanded-bodies ()
|
||||||
"Expanded shell bodies should not start with a blank line
|
"Expanded shell bodies should not start with a blank line
|
||||||
unless the body of the tangled block does."
|
unless the body of the tangled block does."
|
||||||
|
|
|
@ -10,17 +10,7 @@
|
||||||
|
|
||||||
;; Template test file for Org-mode tests
|
;; Template test file for Org-mode tests
|
||||||
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(let ((load-path (cons (expand-file-name
|
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Tests
|
|
||||||
|
|
||||||
;; TODO Test Broken (wrong-type-argument number-or-marker-p "2.0")
|
;; TODO Test Broken (wrong-type-argument number-or-marker-p "2.0")
|
||||||
;; (ert-deftest test-ob-table/sbe ()
|
;; (ert-deftest test-ob-table/sbe ()
|
||||||
|
|
|
@ -12,15 +12,6 @@
|
||||||
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(let ((load-path (cons (expand-file-name
|
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Tests
|
|
||||||
|
|
||||||
;; TODO
|
;; TODO
|
||||||
;; (ert-deftest ob-tangle/noweb-on-tangle ()
|
;; (ert-deftest ob-tangle/noweb-on-tangle ()
|
||||||
|
|
|
@ -5,14 +5,6 @@
|
||||||
|
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
(let ((load-path (cons (expand-file-name
|
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(ert-deftest test-org-babel/multi-line-header-regexp ()
|
(ert-deftest test-org-babel/multi-line-header-regexp ()
|
||||||
(should(equal "^[ \t]*#\\+headers?:[ \t]*\\([^\n]*\\)$"
|
(should(equal "^[ \t]*#\\+headers?:[ \t]*\\([^\n]*\\)$"
|
||||||
org-babel-multi-line-header-regexp))
|
org-babel-multi-line-header-regexp))
|
||||||
|
|
|
@ -6,14 +6,7 @@
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
(let ((load-path (cons (expand-file-name
|
;;; Code:
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts)
|
|
||||||
(require 'org-ascii))
|
|
||||||
|
|
||||||
(ert-deftest test-org-exp/stripping-commas ()
|
(ert-deftest test-org-exp/stripping-commas ()
|
||||||
"Test the stripping of commas from within blocks during export."
|
"Test the stripping of commas from within blocks during export."
|
||||||
(org-test-at-id "76d3a083-67fa-4506-a41d-837cc48158b5"
|
(org-test-at-id "76d3a083-67fa-4506-a41d-837cc48158b5"
|
||||||
|
|
|
@ -10,18 +10,9 @@
|
||||||
|
|
||||||
;; Template test file for Org-mode tests
|
;; Template test file for Org-mode tests
|
||||||
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(let ((load-path (cons (expand-file-name
|
(unless (featurep 'org-html)
|
||||||
".." (file-name-directory
|
(signal 'missing-test-dependency "Support for Org-html"))
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Tests
|
|
||||||
(require 'org-html)
|
|
||||||
|
|
||||||
(defmacro org-test-html/export-link (name link expected &optional desc opt-plist)
|
(defmacro org-test-html/export-link (name link expected &optional desc opt-plist)
|
||||||
`(ert-deftest ,(intern (concat "test-org-html/export-link/" name)) ()
|
`(ert-deftest ,(intern (concat "test-org-html/export-link/" name)) ()
|
||||||
|
|
|
@ -10,17 +10,7 @@
|
||||||
|
|
||||||
;; Template test file for Org-mode tests
|
;; Template test file for Org-mode tests
|
||||||
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(let ((load-path (cons (expand-file-name
|
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Tests
|
|
||||||
(ert-deftest test-org-table/org-table-convert-refs-to-an/1 ()
|
(ert-deftest test-org-table/org-table-convert-refs-to-an/1 ()
|
||||||
"Simple reference @1$1."
|
"Simple reference @1$1."
|
||||||
(should
|
(should
|
||||||
|
|
|
@ -10,17 +10,7 @@
|
||||||
|
|
||||||
;; Template test file for Org-mode tests
|
;; Template test file for Org-mode tests
|
||||||
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(let* ((testing-lisp-dir (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
(load-path (cons testing-lisp-dir load-path)))
|
|
||||||
(dolist (file (directory-files testing-lisp-dir 'full
|
|
||||||
"^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.org$"))
|
|
||||||
(require (intern (substring file 0 (- (length file) 3))))))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Tests
|
|
||||||
(ert-deftest test-org/org-link-escape-ascii-character ()
|
(ert-deftest test-org/org-link-escape-ascii-character ()
|
||||||
"Escape an ascii character."
|
"Escape an ascii character."
|
||||||
(should
|
(should
|
||||||
|
|
|
@ -6,13 +6,7 @@
|
||||||
;; Released under the GNU General Public License version 3
|
;; Released under the GNU General Public License version 3
|
||||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
(let ((load-path (cons (expand-file-name
|
;;; Code:
|
||||||
".." (file-name-directory
|
|
||||||
(or load-file-name buffer-file-name)))
|
|
||||||
load-path)))
|
|
||||||
(require 'org-test)
|
|
||||||
(require 'org-test-ob-consts))
|
|
||||||
|
|
||||||
(defmacro test-org-in-property-buffer (&rest body)
|
(defmacro test-org-in-property-buffer (&rest body)
|
||||||
`(with-temp-buffer
|
`(with-temp-buffer
|
||||||
(insert-file-contents (expand-file-name "property-inheritance.org"
|
(insert-file-contents (expand-file-name "property-inheritance.org"
|
||||||
|
|
Loading…
Reference in New Issue