aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-12-08 10:28:54 +0100
committerAndrea Corallo2020-01-01 11:38:12 +0100
commitb3db331e8c36ef9706ad16c12055079bcd93c022 (patch)
tree855e2101eb8fd788105b4eb1c28afdc865ddab77 /test/src
parent3345399e87fe6100ef82c399337760ab01182240 (diff)
downloademacs-b3db331e8c36ef9706ad16c12055079bcd93c022.tar.gz
emacs-b3db331e8c36ef9706ad16c12055079bcd93c022.zip
add native interactive support test
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-test-funcs.el11
-rw-r--r--test/src/comp-tests.el12
2 files changed, 23 insertions, 0 deletions
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 @@
261 "A nice docstring" 261 "A nice docstring"
262 t) 262 t)
263 263
264(defun comp-test-interactive-form0-f (dir)
265 (interactive "D")
266 dir)
267
268(defun comp-test-interactive-form1-f (x y)
269 (interactive '(1 2))
270 (+ x y))
271
272(defun comp-test-interactive-form2-f ()
273 (interactive))
274
264 275
265;;;;;;;;;;;;;;;;;;;; 276;;;;;;;;;;;;;;;;;;;;
266;; Tromey's tests ;; 277;; 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."
313 (should (string= (symbol-file #'comp-tests-doc-f) 313 (should (string= (symbol-file #'comp-tests-doc-f)
314 (concat comp-test-src "n")))) 314 (concat comp-test-src "n"))))
315 315
316(ert-deftest comp-test-interactive-form ()
317 (should (equal (interactive-form #'comp-test-interactive-form0-f)
318 '(interactive "D")))
319 (should (equal (interactive-form #'comp-test-interactive-form1-f)
320 '(interactive '(1 2))))
321 (should (equal (interactive-form #'comp-test-interactive-form2-f)
322 '(interactive nil)))
323 (should (cl-every #'commandp '(comp-test-interactive-form0-f
324 comp-test-interactive-form1-f
325 comp-test-interactive-form2-f)))
326 (should-not (commandp #'comp-tests-doc-f)))
327
316(ert-deftest comp-tests-free-fun () 328(ert-deftest comp-tests-free-fun ()
317 "Check we are able to compile a single function." 329 "Check we are able to compile a single function."
318 (defun comp-tests-free-fun-f () 330 (defun comp-tests-free-fun-f ()