summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/mod-test/test.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/mod-test/test.el b/modules/mod-test/test.el
index 98ce46411bd..34090d9b062 100644
--- a/modules/mod-test/test.el
+++ b/modules/mod-test/test.el
@@ -28,7 +28,17 @@
;;
(ert-deftest mod-test-sum-test ()
- (should (= (mod-test-sum 1 2) 3)))
+ (should (= (mod-test-sum 1 2) 3))
+ (let ((descr (should-error (mod-test-sum 1 2 3))))
+ (should (eq (car descr) 'wrong-number-of-arguments))
+ (should (stringp (nth 1 descr)))
+ (should (eq 0
+ (string-match
+ (if (eq system-type 'windows-nt)
+ "#<module function at \\(0x\\)?[0-9a-fA-F]+ from .*>"
+ "#<module function Fmod_test_sum from .*>")
+ (nth 1 descr))))
+ (should (= (nth 2 descr) 3))))
(ert-deftest mod-test-sum-docstring ()
(should (string= (documentation 'mod-test-sum) "Return A + B")))