aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorPhilipp Stephani2017-05-19 13:26:29 +0200
committerPhilipp Stephani2017-05-19 13:30:25 +0200
commit45944e0183af5b6a2e31248a815fb061f9757eed (patch)
treeb1ef7f1fc7cb477073d2fd5708996107140bf179 /test/src
parentc189986b241cbe79b0e027fa08bba710ac645bb3 (diff)
downloademacs-45944e0183af5b6a2e31248a815fb061f9757eed.tar.gz
emacs-45944e0183af5b6a2e31248a815fb061f9757eed.zip
Fix module tests on some systems
If dladdr(3) isn't available or didn't work, the printed representation of a module function will not include the file name, but only the address. Make the tests pass in that case. * test/src/emacs-module-tests.el (module-function-object): Fix match for module function printed representation
Diffstat (limited to 'test/src')
-rw-r--r--test/src/emacs-module-tests.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index eb7c82b2f60..0f4bfae00a2 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -78,13 +78,11 @@ changes."
78 (let ((obj (nth 2 body))) 78 (let ((obj (nth 2 body)))
79 (should (equal (type-of obj) 'module-function)) 79 (should (equal (type-of obj) 'module-function))
80 (should (string-match-p 80 (should (string-match-p
81 (rx (or "#<module function Fmod_test_sum from " 81 (rx "#<module function "
82 ;; MS-Windows doesn't allow us to get the 82 (or "Fmod_test_sum"
83 ;; function name, only the address. 83 (and "at 0x" (+ hex-digit)))
84 (and "#<module function at 0x" 84 (? " from " (* nonl) "mod-test" (* nonl) )
85 (one-or-more hex-digit) 85 ">")
86 " from "))
87 (* nonl) "mod-test" (* nonl) ">")
88 (prin1-to-string obj))))))) 86 (prin1-to-string obj)))))))
89 87
90;; 88;;