]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix simple-tests as fallout of last change
authorEli Zaretskii <eliz@gnu.org>
Thu, 27 Jun 2024 08:37:15 +0000 (11:37 +0300)
committerEshel Yaron <me@eshelyaron.com>
Fri, 28 Jun 2024 05:49:59 +0000 (07:49 +0200)
* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): Fix test broken by new
kill-whole-line tests.  (Bug#65734)

(cherry picked from commit f475a1a25449509aa8c081d63f6ca63833cfdd35)

test/lisp/simple-tests.el

index 9e3e71bd69ba47ff3897c1ccb89a52a27695806c..d94fa4a583d71ac9eeb4942b1cc73e6d8c1cf28a 100644 (file)
@@ -126,7 +126,12 @@ mark there."
   (should (equal (execute-extended-command--shorter
                   "display-line-numbers-mode"
                   "display-line")
-                 "di-n")))
+                 ;; Depending on the tests performed and their order, we
+                 ;; could have loaded Dired, which defines commands
+                 ;; starting with "dir".
+                 (if (featurep 'dired)
+                     "dis-n"
+                   "di-n"))))
 
 (ert-deftest simple-execute-extended-command--describe-binding-msg ()
   (let ((text-quoting-style 'grave))
@@ -1093,6 +1098,7 @@ See Bug#21722."
 \f
 ;;; Tests for `kill-whole-line'
 
+(declare-function org-fold-hide-sublevels "org-fold" (levels))
 (ert-deftest kill-whole-line-invisible ()
   (cl-flet ((test (kill-whole-line-arg &rest expected-lines)
               (ert-info ((format "%s" kill-whole-line-arg) :prefix "Subtest: ")