diff options
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/emacs-module-tests.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 096c6b30574..1eebb418cf3 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el | |||
| @@ -468,4 +468,36 @@ See Bug#36226." | |||
| 468 | (should (equal (buffer-string) "data from thread"))) | 468 | (should (equal (buffer-string) "data from thread"))) |
| 469 | (delete-process process))))) | 469 | (delete-process process))))) |
| 470 | 470 | ||
| 471 | (ert-deftest module/interactive/return-t () | ||
| 472 | (should (functionp (symbol-function #'mod-test-return-t))) | ||
| 473 | (should (module-function-p (symbol-function #'mod-test-return-t))) | ||
| 474 | (should-not (commandp #'mod-test-return-t)) | ||
| 475 | (should-not (commandp (symbol-function #'mod-test-return-t))) | ||
| 476 | (should-not (interactive-form #'mod-test-return-t)) | ||
| 477 | (should-not (interactive-form (symbol-function #'mod-test-return-t))) | ||
| 478 | (should-error (call-interactively #'mod-test-return-t) | ||
| 479 | :type 'wrong-type-argument)) | ||
| 480 | |||
| 481 | (ert-deftest module/interactive/return-t-int () | ||
| 482 | (should (functionp (symbol-function #'mod-test-return-t-int))) | ||
| 483 | (should (module-function-p (symbol-function #'mod-test-return-t-int))) | ||
| 484 | (should (commandp #'mod-test-return-t-int)) | ||
| 485 | (should (commandp (symbol-function #'mod-test-return-t-int))) | ||
| 486 | (should (equal (interactive-form #'mod-test-return-t-int) '(interactive))) | ||
| 487 | (should (equal (interactive-form (symbol-function #'mod-test-return-t-int)) | ||
| 488 | '(interactive))) | ||
| 489 | (should (eq (mod-test-return-t-int) t)) | ||
| 490 | (should (eq (call-interactively #'mod-test-return-t-int) t))) | ||
| 491 | |||
| 492 | (ert-deftest module/interactive/identity () | ||
| 493 | (should (functionp (symbol-function #'mod-test-identity))) | ||
| 494 | (should (module-function-p (symbol-function #'mod-test-identity))) | ||
| 495 | (should (commandp #'mod-test-identity)) | ||
| 496 | (should (commandp (symbol-function #'mod-test-identity))) | ||
| 497 | (should (equal (interactive-form #'mod-test-identity) '(interactive "i"))) | ||
| 498 | (should (equal (interactive-form (symbol-function #'mod-test-identity)) | ||
| 499 | '(interactive "i"))) | ||
| 500 | (should (eq (mod-test-identity 123) 123)) | ||
| 501 | (should-not (call-interactively #'mod-test-identity))) | ||
| 502 | |||
| 471 | ;;; emacs-module-tests.el ends here | 503 | ;;; emacs-module-tests.el ends here |