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 ()
|
||||
(should t))
|
||||
|
||||
|
|
|
@ -6,18 +6,12 @@
|
|||
;; Released under the GNU General Public License version 3
|
||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
;;; Code:
|
||||
(org-test-for-executable "R")
|
||||
(unless (featurep 'ess)
|
||||
(signal 'missing-test-dependency "ESS"))
|
||||
|
||||
(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))
|
||||
|
||||
(require 'ob-R)
|
||||
(unless (featurep 'ob-R)
|
||||
(signal 'missing-test-dependency "Support for R code blocks"))
|
||||
|
||||
(ert-deftest test-ob-R/simple-session ()
|
||||
(org-test-with-temp-text
|
||||
|
|
|
@ -6,16 +6,10 @@
|
|||
;; Released under the GNU General Public License version 3
|
||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
;;; Code:
|
||||
(org-test-for-executable "awk")
|
||||
|
||||
(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))
|
||||
|
||||
(require 'ob-awk)
|
||||
(unless (featurep 'ob-awk)
|
||||
(signal 'missing-test-dependency "Support for Awk code blocks"))
|
||||
|
||||
(ert-deftest ob-awk/input-none ()
|
||||
"Test with no input file"
|
||||
|
|
|
@ -10,19 +10,7 @@
|
|||
|
||||
;; Org-mode tests for ob-emacs-lisp.el live here
|
||||
|
||||
|
||||
;;; 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 ()
|
||||
(org-test-with-temp-text-in-file "
|
||||
#+begin_src emacs-lisp
|
||||
|
|
|
@ -10,17 +10,7 @@
|
|||
|
||||
;; Template test file for Org-mode tests
|
||||
|
||||
|
||||
;;; 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 ()
|
||||
"Testing export without any headlines in the org-mode 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
|
||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
;;; Code:
|
||||
(org-test-for-executable "gfortran")
|
||||
|
||||
(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))
|
||||
|
||||
(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))
|
||||
(unless (featurep 'ob-fortran)
|
||||
(signal 'missing-test-dependency "Support for Fortran code blocks"))
|
||||
|
||||
(ert-deftest ob-fortran/assert ()
|
||||
(should t))
|
||||
|
|
|
@ -6,14 +6,9 @@
|
|||
;; Released under the GNU General Public License version 3
|
||||
;; 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))
|
||||
|
||||
(require 'ob-lilypond)
|
||||
;;; Code:
|
||||
(unless (featurep 'ob-lilypond)
|
||||
(signal 'missing-test-dependency "Support for Lilypond code blocks"))
|
||||
|
||||
(save-excursion
|
||||
(set-buffer (get-buffer-create "test-ob-lilypond.el"))
|
||||
|
|
|
@ -5,31 +5,9 @@
|
|||
|
||||
;; Released under the GNU General Public License version 3
|
||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
(org-test-for-executable "maxima")
|
||||
|
||||
(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))
|
||||
|
||||
(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))
|
||||
(unless (featurep 'ob-maxima)
|
||||
(signal 'missing-test-dependency "Support for Maxima code blocks"))
|
||||
|
||||
(ert-deftest ob-maxima/assert ()
|
||||
(should t))
|
||||
|
|
|
@ -5,17 +5,9 @@
|
|||
|
||||
;; Released under the GNU General Public License version 3
|
||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
(org-test-for-executable "octave")
|
||||
|
||||
(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))
|
||||
|
||||
(require 'ob-octave)
|
||||
(unless (featurep 'ob-octave)
|
||||
(signal 'missing-test-dependency "Support for Octave code blocks"))
|
||||
|
||||
(ert-deftest ob-octave/input-none ()
|
||||
"Number output"
|
||||
|
|
|
@ -6,16 +6,10 @@
|
|||
;; Released under the GNU General Public License version 3
|
||||
;; see: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
;;; Code:
|
||||
(org-test-for-executable "python")
|
||||
|
||||
(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))
|
||||
|
||||
(require 'ob-python)
|
||||
(unless (featurep 'ob-python)
|
||||
(signal 'missing-test-dependency "Support for Python code blocks"))
|
||||
|
||||
(ert-deftest test-ob-python/colnames-yes-header-argument ()
|
||||
(org-test-with-temp-text "#+name: eg
|
||||
|
|
|
@ -8,17 +8,10 @@
|
|||
|
||||
;; Template test file for Org-mode tests
|
||||
|
||||
|
||||
;;; 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))
|
||||
(unless (featurep 'ob-sh)
|
||||
(signal 'missing-test-dependency "Support for Sh code blocks"))
|
||||
|
||||
|
||||
;;; Tests
|
||||
(ert-deftest test-ob-sh/dont-insert-spaces-on-expanded-bodies ()
|
||||
"Expanded shell bodies should not start with a blank line
|
||||
unless the body of the tangled block does."
|
||||
|
|
|
@ -10,17 +10,7 @@
|
|||
|
||||
;; Template test file for Org-mode tests
|
||||
|
||||
|
||||
;;; 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")
|
||||
;; (ert-deftest test-ob-table/sbe ()
|
||||
|
|
|
@ -12,15 +12,6 @@
|
|||
|
||||
|
||||
;;; 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
|
||||
;; (ert-deftest ob-tangle/noweb-on-tangle ()
|
||||
|
|
|
@ -5,14 +5,6 @@
|
|||
|
||||
;; Released under the GNU General Public License version 3
|
||||
;; 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 ()
|
||||
(should(equal "^[ \t]*#\\+headers?:[ \t]*\\([^\n]*\\)$"
|
||||
org-babel-multi-line-header-regexp))
|
||||
|
|
|
@ -6,14 +6,7 @@
|
|||
;; Released under the GNU General Public License version 3
|
||||
;; 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)
|
||||
(require 'org-ascii))
|
||||
|
||||
;;; Code:
|
||||
(ert-deftest test-org-exp/stripping-commas ()
|
||||
"Test the stripping of commas from within blocks during export."
|
||||
(org-test-at-id "76d3a083-67fa-4506-a41d-837cc48158b5"
|
||||
|
|
|
@ -10,18 +10,9 @@
|
|||
|
||||
;; Template test file for Org-mode tests
|
||||
|
||||
|
||||
;;; 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
|
||||
(require 'org-html)
|
||||
(unless (featurep 'org-html)
|
||||
(signal 'missing-test-dependency "Support for Org-html"))
|
||||
|
||||
(defmacro org-test-html/export-link (name link expected &optional desc opt-plist)
|
||||
`(ert-deftest ,(intern (concat "test-org-html/export-link/" name)) ()
|
||||
|
|
|
@ -10,17 +10,7 @@
|
|||
|
||||
;; Template test file for Org-mode tests
|
||||
|
||||
|
||||
;;; 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 ()
|
||||
"Simple reference @1$1."
|
||||
(should
|
||||
|
|
|
@ -10,17 +10,7 @@
|
|||
|
||||
;; Template test file for Org-mode tests
|
||||
|
||||
|
||||
;;; 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 ()
|
||||
"Escape an ascii character."
|
||||
(should
|
||||
|
|
|
@ -6,13 +6,7 @@
|
|||
;; Released under the GNU General Public License version 3
|
||||
;; 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))
|
||||
|
||||
;;; Code:
|
||||
(defmacro test-org-in-property-buffer (&rest body)
|
||||
`(with-temp-buffer
|
||||
(insert-file-contents (expand-file-name "property-inheritance.org"
|
||||
|
|
Loading…
Reference in New Issue