aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorPhilipp Stephani2017-06-04 18:57:51 +0200
committerPhilipp Stephani2017-06-04 19:50:49 +0200
commit3b0080de52db1756fc47f1642ee9980655421af9 (patch)
tree5d2a765a0ef67144461de82fbc4043a9cb5de378 /test/src
parent18396997b30c053a905c9a509777625ccc01c3d5 (diff)
downloademacs-3b0080de52db1756fc47f1642ee9980655421af9.tar.gz
emacs-3b0080de52db1756fc47f1642ee9980655421af9.zip
Rework printing of module functions
Fix a FIXME in emacs-module.c. Put the printing into print.c, like other types. * src/print.c (print_vectorlike): Add code to print module functions. * src/emacs-module.c (funcall_module): Stop calling 'module_format_fun_env'. Now that module functions are first-class objects, they can be added to signal data directly. (module_handle_signal): Remove now-unused function 'module_format_fun_env'. * test/src/emacs-module-tests.el (mod-test-sum-test): Adapt unit test. * src/eval.c (funcall_lambda): Adapt call to changed signature of 'funcall_module'.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/emacs-module-tests.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 5e78aebf7c3..622bbadb3ef 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -31,13 +31,13 @@
31 (should (= (mod-test-sum 1 2) 3)) 31 (should (= (mod-test-sum 1 2) 3))
32 (let ((descr (should-error (mod-test-sum 1 2 3)))) 32 (let ((descr (should-error (mod-test-sum 1 2 3))))
33 (should (eq (car descr) 'wrong-number-of-arguments)) 33 (should (eq (car descr) 'wrong-number-of-arguments))
34 (should (stringp (nth 1 descr))) 34 (should (module-function-p (nth 1 descr)))
35 (should (eq 0 35 (should (eq 0
36 (string-match 36 (string-match
37 (concat "#<module function " 37 (concat "#<module function "
38 "\\(at \\(0x\\)?[0-9a-fA-F]+\\( from .*\\)?" 38 "\\(at \\(0x\\)?[0-9a-fA-F]+\\( from .*\\)?"
39 "\\|Fmod_test_sum from .*\\)>") 39 "\\|Fmod_test_sum from .*\\)>")
40 (nth 1 descr)))) 40 (prin1-to-string (nth 1 descr)))))
41 (should (= (nth 2 descr) 3))) 41 (should (= (nth 2 descr) 3)))
42 (should-error (mod-test-sum "1" 2) :type 'wrong-type-argument) 42 (should-error (mod-test-sum "1" 2) :type 'wrong-type-argument)
43 (should-error (mod-test-sum 1 "2") :type 'wrong-type-argument) 43 (should-error (mod-test-sum 1 "2") :type 'wrong-type-argument)