aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorGlenn Morris2017-06-12 17:37:30 -0400
committerGlenn Morris2017-06-12 17:37:55 -0400
commit73b50a10732fa325f59365a7cd5ae48ddf71056c (patch)
tree298e5121cc5a08dcc94ffb6421314c47abe0f222 /test/src
parent1da7bc7e465a5462d0e20b040ba51bc45fb9f65a (diff)
downloademacs-73b50a10732fa325f59365a7cd5ae48ddf71056c.tar.gz
emacs-73b50a10732fa325f59365a7cd5ae48ddf71056c.zip
Give a more informative failure in module assertion test
* test/src/emacs-module-tests.el (module--test-assertions): Rephrase final check to give a more informative failure.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/emacs-module-tests.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index aea0bba540b..a4994b6223b 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -205,11 +205,14 @@ changes."
205 ;; module assertions. 205 ;; module assertions.
206 (mod-test-invalid-store) 206 (mod-test-invalid-store)
207 (mod-test-invalid-load))))))) 207 (mod-test-invalid-load)))))))
208 ;; FIXME a failure here gives an uninformative error. 208 (search-backward "Emacs module assertion:")
209 (re-search-backward (rx bos "Emacs module assertion: " 209 (should (string-match-p (rx bos "Emacs module assertion: "
210 "Emacs value not found in " 210 "Emacs value not found in "
211 (+ digit) " values of " 211 (+ digit) " values of "
212 (+ digit) " environments" ?\n eos))) 212 (+ digit) " environments" eos)
213 (buffer-substring-no-properties
214 (line-beginning-position)
215 (line-end-position)))))
213 (delete-directory tempdir t)))) 216 (delete-directory tempdir t))))
214 217
215;;; emacs-module-tests.el ends here 218;;; emacs-module-tests.el ends here