diff options
| author | Andrea Corallo | 2019-12-08 10:28:54 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:38:12 +0100 |
| commit | b3db331e8c36ef9706ad16c12055079bcd93c022 (patch) | |
| tree | 855e2101eb8fd788105b4eb1c28afdc865ddab77 /test/src | |
| parent | 3345399e87fe6100ef82c399337760ab01182240 (diff) | |
| download | emacs-b3db331e8c36ef9706ad16c12055079bcd93c022.tar.gz emacs-b3db331e8c36ef9706ad16c12055079bcd93c022.zip | |
add native interactive support test
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-test-funcs.el | 11 | ||||
| -rw-r--r-- | test/src/comp-tests.el | 12 |
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 () |