From: Eli Zaretskii Date: Tue, 24 Nov 2015 19:13:46 +0000 (+0200) Subject: Add one more mod-test test X-Git-Tag: emacs-25.0.90~659 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=33ec2ff0f8b77f3c10af395d3e8979508cd78c0a;p=emacs.git Add one more mod-test test * modules/mod-test/test.el (mod-test-sum-test): Test the error signaled when the function is invoked with a wrong number of arguments. --- 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) + "#" + "#") + (nth 1 descr)))) + (should (= (nth 2 descr) 3)))) (ert-deftest mod-test-sum-docstring () (should (string= (documentation 'mod-test-sum) "Return A + B")))