diff options
author | Glenn Morris <rgm@gnu.org> | 2017-06-12 17:37:30 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2017-06-12 17:37:55 -0400 |
commit | 73b50a10732fa325f59365a7cd5ae48ddf71056c (patch) | |
tree | 298e5121cc5a08dcc94ffb6421314c47abe0f222 /test/src | |
parent | 1da7bc7e465a5462d0e20b040ba51bc45fb9f65a (diff) | |
download | emacs-73b50a10732fa325f59365a7cd5ae48ddf71056c.tar.gz |
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.el | 13 |
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." ;; module assertions. (mod-test-invalid-store) (mod-test-invalid-load))))))) - ;; FIXME a failure here gives an uninformative error. - (re-search-backward (rx bos "Emacs module assertion: " - "Emacs value not found in " - (+ digit) " values of " - (+ digit) " environments" ?\n eos))) + (search-backward "Emacs module assertion:") + (should (string-match-p (rx bos "Emacs module assertion: " + "Emacs value not found in " + (+ digit) " values of " + (+ digit) " environments" eos) + (buffer-substring-no-properties + (line-beginning-position) + (line-end-position))))) (delete-directory tempdir t)))) ;;; emacs-module-tests.el ends here |