[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"))
- [nongnu] elpa/buttercup updated (24d43b2ce2 -> f2f7f81a83), ELPA Syncer, 2024/02/21
- [nongnu] elpa/buttercup 25924eb0a3 5/9: Merge branch 'improved-throw-messages', ELPA Syncer, 2024/02/21
- [nongnu] elpa/buttercup 21c2260c8f 7/9: test: Correct wording of some matcher tests, ELPA Syncer, 2024/02/21
- [nongnu] elpa/buttercup f2f7f81a83 9/9: Improve fail message for the :to-have-been-called-times matcher, ELPA Syncer, 2024/02/21
- [nongnu] elpa/buttercup 26c090b7ff 2/9: Separate the :to-throw failure types to enable better messages, ELPA Syncer, 2024/02/21
- [nongnu] elpa/buttercup f967fdfc1f 1/9: Use the ert-explainer to check signal args equality in :to-throw, ELPA Syncer, 2024/02/21
- [nongnu] elpa/buttercup c32a74bc28 3/9: Use the explained diffence for the diffing args case,
ELPA Syncer <=
- [nongnu] elpa/buttercup 8595bd91ee 4/9: Move quotes into the format handlers in buttercup--handle-to-throw, ELPA Syncer, 2024/02/21
- [nongnu] elpa/buttercup 48a81c6bda 6/9: Add docstrings for the spy matchers, ELPA Syncer, 2024/02/21
- [nongnu] elpa/buttercup b18ab7fe22 8/9: test: Verify multiple argument matching for :have-been-called-with, ELPA Syncer, 2024/02/21