[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 2f24a44 338/340: Make formatting of backtrace fr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 2f24a44 338/340: Make formatting of backtrace frames closer to that standard for Emacs |
Date: |
Thu, 16 Dec 2021 15:00:02 -0500 (EST) |
branch: elpa/buttercup
commit 2f24a44f31caf5e832bd48438b5424193c5213d1
Author: Paul Pogonyshev <pogonyshev@gmail.com>
Commit: Paul Pogonyshev <pogonyshev@gmail.com>
Make formatting of backtrace frames closer to that standard for Emacs
---
buttercup.el | 5 ++++-
tests/test-buttercup.el | 18 +++++++++---------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index 7b91f61..1dd2afb 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1982,7 +1982,10 @@ If STYLE is nil, use `buttercup-stack-frame-style' or
`crop'."
(setq style (or style buttercup-stack-frame-style 'crop))
(pcase style
(`omit) ; needed to verify valid styles
- (`full (format " %S" (cdr frame)))
+ (`full
+ (if (car frame)
+ (format " %S%s" (cadr frame) (if (cddr frame) (prin1-to-string (cddr
frame)) "()"))
+ (format " %S" (cdr frame))))
(`crop
(let ((line (buttercup--format-stack-frame frame 'full)))
;; Note: this could be done sith `s-truncate' from the s
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 8edcee0..bda3e6f 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -1459,7 +1459,7 @@ text properties using `ansi-color-apply'."
:suites test-suites :reporter #'backtrace-reporter
:frame-style 'crop
(buttercup-run :noerror)
- (setq long-string (truncate-string-to-width long-string 62))
+ (setq long-string (truncate-string-to-width long-string 63))
(expect (buttercup-output) :to-match
(rx-to-string
`(seq
@@ -1468,9 +1468,9 @@ text properties using `ansi-color-apply'."
"suite bc-bt-backtrace\n"
"\n"
"Traceback (most recent call last):\n"
- " (bc-bt-foo \"" (eval ,long-string) "...\n"
- " (bc-bt-bar \"" (eval ,long-string) "...\n"
- " (bc-bt-baz \"" (eval ,long-string) "...\n"
+ " bc-bt-foo(\"" (eval ,long-string) "...\n"
+ " bc-bt-bar(\"" (eval ,long-string) "...\n"
+ " bc-bt-baz(\"" (eval ,long-string) "...\n"
(* (seq " " (or (seq (= 74 not-newline) (= 3 ?.))
(seq (** 0 74 not-newline) (= 3 (not (any
?.))))) "\n"))
"error: (" (* anything) ")\n\n"
@@ -1488,9 +1488,9 @@ text properties using `ansi-color-apply'."
"suite bc-bt-backtrace\n"
"\n"
"Traceback (most recent call last):\n"
- " (bc-bt-foo \"" (eval ,long-string) "\")\n"
- " (bc-bt-bar \"" (eval ,long-string) "\")\n"
- " (bc-bt-baz \"" (eval ,long-string) "\")\n"
+ " bc-bt-foo(\"" (eval ,long-string) "\")\n"
+ " bc-bt-bar(\"" (eval ,long-string) "\")\n"
+ " bc-bt-baz(\"" (eval ,long-string) "\")\n"
(* (seq " " (* not-newline) (= 3 (not (any ?.))) "\n"))
"error: (" (* anything) ")\n\n"
string-end)))))
@@ -1543,13 +1543,13 @@ text properties using `ansi-color-apply'."
"backtrace for matcher"
""
"Traceback (most recent call last):"
- " (bc-bt-baz \"text\")"
+ " bc-bt-baz(\"text\")"
,(concat
" (or (number-or-marker-p a) (signal "
(if (< emacs-major-version 27)
"(quote wrong-type-argument) (list (quot..."
"'wrong-type-argument (list 'number-or-m..."))
- " (signal wrong-type-argument (number-or-marker-p
\"text\"))"
+ " signal(wrong-type-argument (number-or-marker-p
\"text\"))"
"error: (wrong-type-argument number-or-marker-p
\"text\")"
"" "") "\n"))))))
(matcher-spec "no matcher")
- [nongnu] elpa/buttercup a9647cb 316/340: Bump version: 1.22 → 1.23, (continued)
- [nongnu] elpa/buttercup a9647cb 316/340: Bump version: 1.22 → 1.23, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b76ff35 317/340: Update buttercup.bat to handle all options, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 62a34c7 322/340: Remove elc files in tests on make clean, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0e5eae0 321/340: Merge pull request #192 from snogge/re-patterns, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e0b5d9f 324/340: Correct error message in buttercup--format-stack-frame, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 843fa6f 327/340: Keep the actual variable definition with the reporter, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 315a891 326/340: Fix stack frame collection in buttercup--backtrace, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup cccdedf 334/340: Merge pull request #197 from snogge/omit-traceback, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bef49f5 323/340: Remove extra newline in error backtrace, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6ef715f 328/340: Use buttercup--mark-stackframe to mark the start of test code, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2f24a44 338/340: Make formatting of backtrace frames closer to that standard for Emacs,
ELPA Syncer <=
- [nongnu] elpa/buttercup f6f9335 337/340: test: Add tests for buttercup-run-discovery, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 553ff83 103/340: Add :to-have-same-items-as to compare lists as sets., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 657acef 102/340: Bump version: 1.4 → 1.5, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 7e8898b 127/340: Implement :to-have-been-called-times matcher (close #90), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ca09040 130/340: Improve the Makefile, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a535e51 134/340: Fix a logic error in spy tests, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6ad9565 135/340: Fix several edge cases in "spy-on", ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 389dc43 139/340: Fix a problem with reporter tests suppressing failure messages, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 929a904 143/340: Implement closure-based expect macro, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 11d7fdc 148/340: Add "--help" option to buttercup command-line script, ELPA Syncer, 2021/12/16