aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGlenn Morris2013-11-05 23:50:18 -0800
committerGlenn Morris2013-11-05 23:50:18 -0800
commitc76489d611ad7340a2e57f3312820494d5c7ddbb (patch)
treea4815633544e0906d44cc9efe8b427a97e3adfd3 /test
parent94ae2ad44cfd711c836e0fbd86b9e133724482d5 (diff)
downloademacs-c76489d611ad7340a2e57f3312820494d5c7ddbb.tar.gz
emacs-c76489d611ad7340a2e57f3312820494d5c7ddbb.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog9
-rw-r--r--test/automated/flymake-tests.el10
-rw-r--r--test/automated/info-xref.el3
-rw-r--r--test/automated/vc-bzr.el13
4 files changed, 17 insertions, 18 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 26111ce5030..aac3f6836ae 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,12 @@
12013-11-06 Glenn Morris <rgm@gnu.org>
2
3 * automated/flymake-tests.el (warning-predicate-rx-gcc)
4 (warning-predicate-function-gcc, warning-predicate-rx-perl)
5 (warning-predicate-function-perl):
6 * automated/info-xref.el (info-xref-test-makeinfo):
7 * automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
8 (vc-bzr-test-faulty-bzr-autoloads): Skip rather than expect failure.
9
12013-11-05 Michael Albinus <michael.albinus@gmx.de> 102013-11-05 Michael Albinus <michael.albinus@gmx.de>
2 11
3 * automated/tramp-tests.el: New file. 12 * automated/tramp-tests.el: New file.
diff --git a/test/automated/flymake-tests.el b/test/automated/flymake-tests.el
index 2b2f3ee1528..34a7b4f3696 100644
--- a/test/automated/flymake-tests.el
+++ b/test/automated/flymake-tests.el
@@ -47,28 +47,26 @@
47 47
48(ert-deftest warning-predicate-rx-gcc () 48(ert-deftest warning-predicate-rx-gcc ()
49 "Test GCC warning via regexp predicate." 49 "Test GCC warning via regexp predicate."
50 :expected-result (if (executable-find "gcc") :passed :failed) 50 (skip-unless (executable-find "gcc"))
51 (should (eq 'flymake-warnline 51 (should (eq 'flymake-warnline
52 (flymake-tests--current-face "test.c" "^[Ww]arning")))) 52 (flymake-tests--current-face "test.c" "^[Ww]arning"))))
53 53
54(ert-deftest warning-predicate-function-gcc () 54(ert-deftest warning-predicate-function-gcc ()
55 "Test GCC warning via function predicate." 55 "Test GCC warning via function predicate."
56 :expected-result (if (and (executable-find "gcc") (executable-find "make")) 56 (skip-unless (and (executable-find "gcc") (executable-find "make")))
57 :passed
58 :failed)
59 (should (eq 'flymake-warnline 57 (should (eq 'flymake-warnline
60 (flymake-tests--current-face "test.c" 58 (flymake-tests--current-face "test.c"
61 (lambda (msg) (string-match "^[Ww]arning" msg)))))) 59 (lambda (msg) (string-match "^[Ww]arning" msg))))))
62 60
63(ert-deftest warning-predicate-rx-perl () 61(ert-deftest warning-predicate-rx-perl ()
64 "Test perl warning via regular expression predicate." 62 "Test perl warning via regular expression predicate."
65 :expected-result (if (executable-find "perl") :passed :failed) 63 (skip-unless (executable-find "perl"))
66 (should (eq 'flymake-warnline 64 (should (eq 'flymake-warnline
67 (flymake-tests--current-face "test.pl" "^Scalar value")))) 65 (flymake-tests--current-face "test.pl" "^Scalar value"))))
68 66
69(ert-deftest warning-predicate-function-perl () 67(ert-deftest warning-predicate-function-perl ()
70 "Test perl warning via function predicate." 68 "Test perl warning via function predicate."
71 :expected-result (if (executable-find "perl") :passed :failed) 69 (skip-unless (executable-find "perl"))
72 (should (eq 'flymake-warnline 70 (should (eq 'flymake-warnline
73 (flymake-tests--current-face 71 (flymake-tests--current-face
74 "test.pl" 72 "test.pl"
diff --git a/test/automated/info-xref.el b/test/automated/info-xref.el
index 973af0d46c7..54cd534e8ce 100644
--- a/test/automated/info-xref.el
+++ b/test/automated/info-xref.el
@@ -95,8 +95,7 @@ text.
95 95
96(ert-deftest info-xref-test-makeinfo () 96(ert-deftest info-xref-test-makeinfo ()
97 "Test that info-xref can parse basic makeinfo output." 97 "Test that info-xref can parse basic makeinfo output."
98 :expected-result (if (executable-find "makeinfo") :passed :failed) 98 (skip-unless (executable-find "makeinfo"))
99 (should (executable-find "makeinfo"))
100 (let ((tempfile (make-temp-file "info-xref-test" nil ".texi")) 99 (let ((tempfile (make-temp-file "info-xref-test" nil ".texi"))
101 (tempfile2 (make-temp-file "info-xref-test2" nil ".texi")) 100 (tempfile2 (make-temp-file "info-xref-test2" nil ".texi"))
102 (errflag t)) 101 (errflag t))
diff --git a/test/automated/vc-bzr.el b/test/automated/vc-bzr.el
index 2776435be82..18918607c27 100644
--- a/test/automated/vc-bzr.el
+++ b/test/automated/vc-bzr.el
@@ -27,14 +27,9 @@
27(require 'vc-bzr) 27(require 'vc-bzr)
28(require 'vc-dir) 28(require 'vc-dir)
29 29
30;; FIXME it would be better to skip all these tests if there is no
31;; bzr installed. We could just put everything inside an IF
32;; statement, but it would be nice if ERT had a "skipped" facility (?).
33
34(ert-deftest vc-bzr-test-bug9726 () 30(ert-deftest vc-bzr-test-bug9726 ()
35 "Test for http://debbugs.gnu.org/9726 ." 31 "Test for http://debbugs.gnu.org/9726 ."
36 :expected-result (if (executable-find vc-bzr-program) :passed :failed) 32 (skip-unless (executable-find vc-bzr-program))
37 (should (executable-find vc-bzr-program))
38 (let* ((tempdir (make-temp-file "vc-bzr-test" t)) 33 (let* ((tempdir (make-temp-file "vc-bzr-test" t))
39 (ignored-dir (expand-file-name "ignored-dir" tempdir)) 34 (ignored-dir (expand-file-name "ignored-dir" tempdir))
40 (default-directory (file-name-as-directory tempdir))) 35 (default-directory (file-name-as-directory tempdir)))
@@ -64,8 +59,7 @@
64;; Not specific to bzr. 59;; Not specific to bzr.
65(ert-deftest vc-bzr-test-bug9781 () 60(ert-deftest vc-bzr-test-bug9781 ()
66 "Test for http://debbugs.gnu.org/9781 ." 61 "Test for http://debbugs.gnu.org/9781 ."
67 :expected-result (if (executable-find vc-bzr-program) :passed :failed) 62 (skip-unless (executable-find vc-bzr-program))
68 (should (executable-find vc-bzr-program))
69 (let* ((tempdir (make-temp-file "vc-bzr-test" t)) 63 (let* ((tempdir (make-temp-file "vc-bzr-test" t))
70 (subdir (expand-file-name "subdir" tempdir)) 64 (subdir (expand-file-name "subdir" tempdir))
71 (file (expand-file-name "file" tempdir)) 65 (file (expand-file-name "file" tempdir))
@@ -101,8 +95,7 @@
101;; http://lists.gnu.org/archive/html/help-gnu-emacs/2012-04/msg00145.html 95;; http://lists.gnu.org/archive/html/help-gnu-emacs/2012-04/msg00145.html
102(ert-deftest vc-bzr-test-faulty-bzr-autoloads () 96(ert-deftest vc-bzr-test-faulty-bzr-autoloads ()
103 "Test we can generate autoloads in a bzr directory when bzr is faulty." 97 "Test we can generate autoloads in a bzr directory when bzr is faulty."
104 :expected-result (if (executable-find vc-bzr-program) :passed :failed) 98 (skip-unless (executable-find vc-bzr-program))
105 (should (executable-find vc-bzr-program))
106 (let* ((tempdir (make-temp-file "vc-bzr-test" t)) 99 (let* ((tempdir (make-temp-file "vc-bzr-test" t))
107 (file (expand-file-name "foo.el" tempdir)) 100 (file (expand-file-name "foo.el" tempdir))
108 (default-directory (file-name-as-directory tempdir)) 101 (default-directory (file-name-as-directory tempdir))