From: Andrea Corallo Date: Sun, 8 Dec 2019 09:28:54 +0000 (+0100) Subject: add native interactive support test X-Git-Tag: emacs-28.0.90~2727^2~923 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3db331e8c36ef9706ad16c12055079bcd93c022;p=emacs.git add native interactive support test --- diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 5e2fb0bd99a..cbf287838cb 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -261,6 +261,17 @@ "A nice docstring" t) +(defun comp-test-interactive-form0-f (dir) + (interactive "D") + dir) + +(defun comp-test-interactive-form1-f (x y) + (interactive '(1 2)) + (+ x y)) + +(defun comp-test-interactive-form2-f () + (interactive)) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 73c1fe14caa..230d5bfbdaf 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -313,6 +313,18 @@ Check that the resulting binaries do not differ." (should (string= (symbol-file #'comp-tests-doc-f) (concat comp-test-src "n")))) +(ert-deftest comp-test-interactive-form () + (should (equal (interactive-form #'comp-test-interactive-form0-f) + '(interactive "D"))) + (should (equal (interactive-form #'comp-test-interactive-form1-f) + '(interactive '(1 2)))) + (should (equal (interactive-form #'comp-test-interactive-form2-f) + '(interactive nil))) + (should (cl-every #'commandp '(comp-test-interactive-form0-f + comp-test-interactive-form1-f + comp-test-interactive-form2-f))) + (should-not (commandp #'comp-tests-doc-f))) + (ert-deftest comp-tests-free-fun () "Check we are able to compile a single function." (defun comp-tests-free-fun-f ()