From b48cbaf5c7e47c002fd274aea21554245075bfe8 Mon Sep 17 00:00:00 2001 From: Mike Kupfer Date: Wed, 17 Nov 2021 20:25:50 -0800 Subject: [PATCH] Fix two failing tests in mh-utils-tests * 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 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/lisp/mh-e/mh-utils-tests.el b/test/lisp/mh-e/mh-utils-tests.el index 3a03d817f5f..0066c00b5b2 100644 --- a/test/lisp/mh-e/mh-utils-tests.el +++ b/test/lisp/mh-e/mh-utils-tests.el @@ -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 () -- 2.39.2