]> git.eshelyaron.com Git - emacs.git/commitdiff
New test for execute-extended-command helper defun
authorStefan Kangas <stefankangas@gmail.com>
Sun, 13 Nov 2022 14:34:02 +0000 (15:34 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Sun, 13 Nov 2022 14:34:02 +0000 (15:34 +0100)
* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): New test.

test/lisp/simple-tests.el

index 97f425f6f480781d3ffff59c21f55e5c7a925378..acb417b80b8f1a6b57f75a0626f28407c55136f2 100644 (file)
     (insert "あ\nい\nう\nえ\nお\n")
     (should (= (count-lines (point) (point)) 0))))
 
+\f
+;;; `execute-extended-command'
+
+(ert-deftest simple-execute-extended-command--shorter ()
+  ;; This test can be flaky with completion frameworks other than the
+  ;; default, so just skip it in interactive sessions.
+  (skip-unless noninteractive)
+  (should (equal (execute-extended-command--shorter
+                  "display-line-numbers-mode"
+                  "display-line")
+                 "di-n")))
+
 \f
 ;;; `transpose-sexps'
 (defmacro simple-test--transpositions (&rest body)