summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/easy-mmode-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/emacs-lisp/easy-mmode-tests.el')
-rw-r--r--test/lisp/emacs-lisp/easy-mmode-tests.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/easy-mmode-tests.el b/test/lisp/emacs-lisp/easy-mmode-tests.el
index 4d7fe9444fb..4a448200a2b 100644
--- a/test/lisp/emacs-lisp/easy-mmode-tests.el
+++ b/test/lisp/emacs-lisp/easy-mmode-tests.el
@@ -44,6 +44,27 @@
'(c-mode (not message-mode mail-mode) text-mode))
t))))
+(ert-deftest easy-mmode--minor-mode ()
+ (with-temp-buffer
+ (define-minor-mode test-mode "A test.")
+ (should (eq test-mode nil))
+ (test-mode t)
+ (should (eq test-mode nil))
+ (test-mode nil)
+ (should (eq test-mode t))
+ (test-mode -33)
+ (should (eq test-mode nil))
+ (test-mode 33)
+ (should (eq test-mode t))
+ (test-mode 0)
+ (should (eq test-mode nil))
+ (test-mode 'toggle)
+ (should (eq test-mode t))
+ (test-mode 'toggle)
+ (should (eq test-mode nil))
+ (test-mode "what")
+ (should (eq test-mode nil))))
+
(provide 'easy-mmode-tests)
;;; easy-mmode-tests.el ends here