* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): New test.
(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)