]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix two failing tests in mh-utils-tests
authorMike Kupfer <mkupfer@alum.berkeley.edu>
Thu, 18 Nov 2021 04:25:50 +0000 (20:25 -0800)
committerStephen Gildea <stepheng+emacs@gildea.com>
Thu, 18 Nov 2021 04:27:21 +0000 (20:27 -0800)
* test/lisp/mh-e/mh-utils-tests.el
(mh-test-utils-mock-call-process): Add mock for root folders.
(mh-folder-completion-function-08-plus-slash)
(mh-folder-completion-function-09-plus-slash-tmp): Skip these tests
with Mailutils, which doesn't handle root folders.  (Bug#51902)

test/lisp/mh-e/mh-utils-tests.el

index 3a03d817f5fab83f3b7ddf403ee285e57457c0ff..0066c00b5b2cc4ad93e64edc971d5cc472bf9471 100644 (file)
@@ -211,6 +211,10 @@ The tests use this method if no configured MH variant is found."
              "/abso-folder/bar   has no messages."
              "/abso-folder/foo   has no messages."
              "/abso-folder/food  has no messages."))
+           (("folders" "-noheader" "-norecurse" "-nototal" "+/") .
+            ("/+             has no messages ; (others)."
+             "//abso-folder  has no messages ; (others)."
+             "//tmp          has no messages ; (others)."))
            ))
         (arglist (cons (file-name-base program) args)))
     (let ((response-list-cons (assoc arglist argument-responses)))
@@ -437,7 +441,10 @@ and the `should' macro requires idempotent evaluation anyway."
 
 (ert-deftest mh-folder-completion-function-08-plus-slash ()
   "Test `mh-folder-completion-function' with `+/'."
-  :tags '(:unstable)
+  ;; This test fails with Mailutils 3.5, 3.7, and 3.13.
+  (with-mh-test-env
+    (skip-unless (not (and (stringp mh-variant-in-use)
+                           (string-search "GNU Mailutils" mh-variant-in-use)))))
   (mh-test-folder-completion-1 "+/" "+/" "tmp/" t)
   ;; case "bb"
   (with-mh-test-env
@@ -447,7 +454,10 @@ and the `should' macro requires idempotent evaluation anyway."
 
 (ert-deftest mh-folder-completion-function-09-plus-slash-tmp ()
   "Test `mh-folder-completion-function' with `+/tmp'."
-  :tags '(:unstable)
+  ;; This test fails with Mailutils 3.5, 3.7, and 3.13.
+  (with-mh-test-env
+    (skip-unless (not (and (stringp mh-variant-in-use)
+                           (string-search "GNU Mailutils" mh-variant-in-use)))))
   (mh-test-folder-completion-1 "+/tmp" "+/tmp/" "tmp/" t))
 
 (ert-deftest mh-folder-completion-function-10-plus-slash-abs-folder ()