Add the actual srcdir to the MODULE_CFLAGS include path, and adjust
the module/describe-function-1 test to ignore the shared library path
prefix, which varies when building outside the source tree.
Bug: https://debbugs.gnu.org/37797
Status: new
# Note: emacs-module.h is generated from emacs-module.h.in, hence we
# look in ../src, not $(srcdir)/../src.
-MODULE_CFLAGS = -I../src -I$(srcdir)/../lib \
+MODULE_CFLAGS = -I../src -I$(srcdir)/../src -I$(srcdir)/../lib \
$(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
(with-temp-buffer
(let ((standard-output (current-buffer)))
(describe-function-1 #'mod-test-sum)
- (should (equal
- (buffer-substring-no-properties 1 (point-max))
- (format "a module function in `data/emacs-module/mod-test%s'.
+ (let ((result (buffer-substring-no-properties 1 (point-max))))
+ (should (string-match-p
+ (format "a module function in `.*data/emacs-module/mod-test%s'.
(mod-test-sum a b)
-Return A + B"
- module-file-suffix))))))
+Return A \\+ B"
+ module-file-suffix)
+ (buffer-substring-no-properties 1 (point-max))))))))
(ert-deftest module/load-history ()
"Check that Bug#30164 is fixed."