emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 73b50a1: Give a more informative failure in module


From: Glenn Morris
Subject: [Emacs-diffs] master 73b50a1: Give a more informative failure in module assertion test
Date: Mon, 12 Jun 2017 17:38:03 -0400 (EDT)

branch: master
commit 73b50a10732fa325f59365a7cd5ae48ddf71056c
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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.
---
 test/src/emacs-module-tests.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index aea0bba..a4994b6 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]