bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14937: vc-bzr.el test fails when bzr installed but using Git checkou


From: Barry OReilly
Subject: bug#14937: vc-bzr.el test fails when bzr installed but using Git checkout of Emacs
Date: Tue, 23 Jul 2013 09:13:24 -0400

Patch follows. May I install to trunk?

diff --git a/test/automated/vc-bzr.el b/test/automated/vc-bzr.el
index 2776435..09010aa 100644
--- a/test/automated/vc-bzr.el
+++ b/test/automated/vc-bzr.el
@@ -31,10 +31,14 @@
 ;; bzr installed.  We could just put everything inside an IF
 ;; statement, but it would be nice if ERT had a "skipped" facility (?).

+(defun vc-bzr-test-p ()
+  (and (executable-find vc-bzr-program)
+       (file-accessible-directory-p ".bzr")))
+
 (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))
+  :expected-result (if (vc-bzr-test-p) :passed :failed)
+  (should (vc-bzr-test-p))
   (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 +68,8 @@
 ;; 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))
+  :expected-result (if (vc-bzr-test-p) :passed :failed)
+  (should (vc-bzr-test-p))
   (let* ((tempdir (make-temp-file "vc-bzr-test" t))
          (subdir (expand-file-name "subdir" tempdir))
          (file (expand-file-name "file" tempdir))
@@ -101,8 +105,8 @@
 ;; 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))
+  :expected-result (if (vc-bzr-test-p) :passed :failed)
+  (should (vc-bzr-test-p))
   (let* ((tempdir (make-temp-file "vc-bzr-test" t))
          (file (expand-file-name "foo.el" tempdir))
          (default-directory (file-name-as-directory tempdir))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]