New test for execute-extended-command helper defun

* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): New test.
This commit is contained in:
Stefan Kangas 2022-11-13 15:34:02 +01:00
parent 73c03d64ce
commit 90a7dee79d

View file

@ -72,6 +72,18 @@
(insert "\n\n\n\n\n")
(should (= (count-lines (point) (point)) 0))))
;;; `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")))
;;; `transpose-sexps'
(defmacro simple-test--transpositions (&rest body)