Commit c76489d6 authored by Glenn Morris's avatar Glenn Morris

Skip some tests rather than expect failure when prereqs not met

* automated/flymake-tests.el (warning-predicate-rx-gcc)
(warning-predicate-function-gcc, warning-predicate-rx-perl)
(warning-predicate-function-perl):
* automated/info-xref.el (info-xref-test-makeinfo):
* automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
(vc-bzr-test-faulty-bzr-autoloads): Skip rather than expect failure.
parent 94ae2ad4
2013-11-06 Glenn Morris <rgm@gnu.org>
* automated/flymake-tests.el (warning-predicate-rx-gcc)
(warning-predicate-function-gcc, warning-predicate-rx-perl)
(warning-predicate-function-perl):
* automated/info-xref.el (info-xref-test-makeinfo):
* automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
(vc-bzr-test-faulty-bzr-autoloads): Skip rather than expect failure.
2013-11-05 Michael Albinus <michael.albinus@gmx.de>
* automated/tramp-tests.el: New file.
......
......@@ -47,28 +47,26 @@
(ert-deftest warning-predicate-rx-gcc ()
"Test GCC warning via regexp predicate."
:expected-result (if (executable-find "gcc") :passed :failed)
(skip-unless (executable-find "gcc"))
(should (eq 'flymake-warnline
(flymake-tests--current-face "test.c" "^[Ww]arning"))))
(ert-deftest warning-predicate-function-gcc ()
"Test GCC warning via function predicate."
:expected-result (if (and (executable-find "gcc") (executable-find "make"))
:passed
:failed)
(skip-unless (and (executable-find "gcc") (executable-find "make")))
(should (eq 'flymake-warnline
(flymake-tests--current-face "test.c"
(lambda (msg) (string-match "^[Ww]arning" msg))))))
(ert-deftest warning-predicate-rx-perl ()
"Test perl warning via regular expression predicate."
:expected-result (if (executable-find "perl") :passed :failed)
(skip-unless (executable-find "perl"))
(should (eq 'flymake-warnline
(flymake-tests--current-face "test.pl" "^Scalar value"))))
(ert-deftest warning-predicate-function-perl ()
"Test perl warning via function predicate."
:expected-result (if (executable-find "perl") :passed :failed)
(skip-unless (executable-find "perl"))
(should (eq 'flymake-warnline
(flymake-tests--current-face
"test.pl"
......
......@@ -95,8 +95,7 @@ text.
(ert-deftest info-xref-test-makeinfo ()
"Test that info-xref can parse basic makeinfo output."
:expected-result (if (executable-find "makeinfo") :passed :failed)
(should (executable-find "makeinfo"))
(skip-unless (executable-find "makeinfo"))
(let ((tempfile (make-temp-file "info-xref-test" nil ".texi"))
(tempfile2 (make-temp-file "info-xref-test2" nil ".texi"))
(errflag t))
......
......@@ -27,14 +27,9 @@
(require 'vc-bzr)
(require 'vc-dir)
;; FIXME it would be better to skip all these tests if there is no
;; bzr installed. We could just put everything inside an IF
;; statement, but it would be nice if ERT had a "skipped" facility (?).
(ert-deftest vc-bzr-test-bug9726 ()
"Test for http://debbugs.gnu.org/9726 ."
:expected-result (if (executable-find vc-bzr-program) :passed :failed)
(should (executable-find vc-bzr-program))
(skip-unless (executable-find vc-bzr-program))
(let* ((tempdir (make-temp-file "vc-bzr-test" t))
(ignored-dir (expand-file-name "ignored-dir" tempdir))
(default-directory (file-name-as-directory tempdir)))
......@@ -64,8 +59,7 @@
;; Not specific to bzr.
(ert-deftest vc-bzr-test-bug9781 ()
"Test for http://debbugs.gnu.org/9781 ."
:expected-result (if (executable-find vc-bzr-program) :passed :failed)
(should (executable-find vc-bzr-program))
(skip-unless (executable-find vc-bzr-program))
(let* ((tempdir (make-temp-file "vc-bzr-test" t))
(subdir (expand-file-name "subdir" tempdir))
(file (expand-file-name "file" tempdir))
......@@ -101,8 +95,7 @@
;; http://lists.gnu.org/archive/html/help-gnu-emacs/2012-04/msg00145.html
(ert-deftest vc-bzr-test-faulty-bzr-autoloads ()
"Test we can generate autoloads in a bzr directory when bzr is faulty."
:expected-result (if (executable-find vc-bzr-program) :passed :failed)
(should (executable-find vc-bzr-program))
(skip-unless (executable-find vc-bzr-program))
(let* ((tempdir (make-temp-file "vc-bzr-test" t))
(file (expand-file-name "foo.el" tempdir))
(default-directory (file-name-as-directory tempdir))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment