emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/buttercup c32a74bc28 3/9: Use the explained diffence for t


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup c32a74bc28 3/9: Use the explained diffence for the diffing args case
Date: Wed, 21 Feb 2024 18:59:25 -0500 (EST)

branch: elpa/buttercup
commit c32a74bc287cd662d7dce5f568ef8945170f6cb3
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>

    Use the explained diffence for the diffing args case
    
    When the signal matches but the arguments don't, use the
    ert-explainers message to help the user understand the difference.
---
 buttercup.el            | 2 +-
 tests/test-buttercup.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/buttercup.el b/buttercup.el
index e906193bba..d6bf927508 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -709,7 +709,7 @@ UNEVALUATED-EXPR if it did not raise any signal."
        (explained-signal-args ; symbol matched
         `(nil . ,(buttercup--simple-format
                   spec
-                  "Expected `%E' to throw %s%a, but instead it threw `%S'%A")))
+                  "Expected `%E' to signal %s%a, but instead signalled%A which 
does not match because %q.")))
        ((not matching-signal-symbol) ; args matched
         `(nil . ,(buttercup--simple-format
                   spec
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index cdd74d2784..c1930addc0 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -633,7 +633,7 @@ text properties using `ansi-color-apply'."
                                           (list 'overflow-error (concat "Foo" 
"bar" "baz"))
                                           '(myfunc) nil)
               :to-equal
-              '(nil . "Expected `(myfunc)' to throw a child signal of 
`overflow-error' with args `(\"Foobarbaz\")', but instead it threw 
`overflow-error' with args `(\"Foobar\")'")))
+              '(nil . "Expected `(myfunc)' to signal a child signal of 
`overflow-error' with args `(\"Foobarbaz\")', but instead signalled with args 
`(\"Foobar\")' which does not match because (list-elt 0 
(arrays-of-different-length 6 9 \"Foobar\" \"Foobarbaz\" first-mismatch-at 
6)).")))
     (it "should not match an unrelated symbol"
       (expect (buttercup--handle-to-throw '(void-variable "Foobar")
                                           (list 'overflow-error (concat "Foo" 
"bar"))



reply via email to

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