Commit 45944e01 authored by Philipp Stephani's avatar Philipp Stephani
Browse files

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
parent c189986b
...@@ -78,13 +78,11 @@ changes." ...@@ -78,13 +78,11 @@ changes."
(let ((obj (nth 2 body))) (let ((obj (nth 2 body)))
(should (equal (type-of obj) 'module-function)) (should (equal (type-of obj) 'module-function))
(should (string-match-p (should (string-match-p
(rx (or "#<module function Fmod_test_sum from " (rx "#<module function "
;; MS-Windows doesn't allow us to get the (or "Fmod_test_sum"
;; function name, only the address. (and "at 0x" (+ hex-digit)))
(and "#<module function at 0x" (? " from " (* nonl) "mod-test" (* nonl) )
(one-or-more hex-digit) ">")
" from "))
(* nonl) "mod-test" (* nonl) ">")
(prin1-to-string obj))))))) (prin1-to-string obj)))))))
;; ;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment