[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/el-mock a843820161 52/64: Update preserve-backtrace tes
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/el-mock a843820161 52/64: Update preserve-backtrace test for Emacs 26+ |
Date: |
Mon, 28 Aug 2023 23:01:42 -0400 (EDT) |
branch: scratch/el-mock
commit a843820161110d94ddf9fd4c80eb053fc9505453
Author: robert.irelan <robert.irelan@bytedance.com>
Commit: robert.irelan <robert.irelan@bytedance.com>
Update preserve-backtrace test for Emacs 26+
The format of backtrace frames was changed.
---
test/el-mock-test.el | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/test/el-mock-test.el b/test/el-mock-test.el
index 16886b1eec..0d076c3478 100644
--- a/test/el-mock-test.el
+++ b/test/el-mock-test.el
@@ -389,8 +389,8 @@
(expect (error mock-error '((foo 1) (foo)))
(with-mock
(mock (foo 1))
- (foo)))
- )
+ (foo))))
+
(defun el-mock-test--signal ()
(error "Foo"))
@@ -406,5 +406,17 @@
(should (ert-test-failed-p result))
(should (equal (ert-test-failed-condition result)
'(error "Foo")))
- (should (equal (car-safe (ert-test-failed-backtrace result))
- '(t el-mock-test--signal)))))
+ (cond
+ ((version< emacs-version "26")
+ (should (equal
+ (nth 0 (ert-test-failed-backtrace result))
+ '(t el-mock-test--signal))))
+ ((version< emacs-version "27")
+ (should (equal
+ (nth 2 (ert-test-failed-backtrace result))
+ '(t el-mock-test--signal nil nil))))
+ (t
+ (should (equal
+ (nth 2 (ert-test-failed-backtrace result))
+ (record 'backtrace-frame t 'el-mock-test--signal
+ nil nil nil nil nil)))))))
- [nongnu] scratch/el-mock c05cc24df6 53/64: Merge pull request #30 from telotortium/fix-backtrace, (continued)
- [nongnu] scratch/el-mock c05cc24df6 53/64: Merge pull request #30 from telotortium/fix-backtrace, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 21157530ca 59/64: Misc cosmetic changes, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 5b0afab8e9 60/64: * test/test-helper.el: Mark as not compiled, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 5fb2867d2e 36/64: Merge pull request #15 from gabrielmdeal/master, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 5084045989 37/64: Fix incf function symbol to cl-incf, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 9ddda16de4 39/64: Switch all Elisp files to lexical binding, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock e301749423 41/64: Merge pull request #21 from phst/compile-error, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 06fc9c4cac 43/64: Specify language of code blocks explicitly, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 5df1d3a956 47/64: Merge pull request #12 from AdrieanKhisbe/improved-ci, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 3a49f4c138 49/64: Remove Travis configuration, replace Build status in readme, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock a843820161 52/64: Update preserve-backtrace test for Emacs 26+,
Stefan Monnier <=
- [nongnu] scratch/el-mock 01cf866b4b 51/64: Fix typo, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 6ebfe64410 54/64: Test Emacs 25.3, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 9d7b886955 55/64: CI coverage for Emacs 28.1, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 6cfbc9de8f 57/64: Merge pull request #32 from peterbecich/ci-coverage-emacs-28, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 6f29ddf7c3 58/64: Consolidate stub/mock setup into `mock--stub-setup`, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock accba69638 63/64: * el-mock.el: Clean up the namespace usage, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 18cee97bf6 62/64: Don't expose the `-*-functions` vars in the macroexpanded code, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 12a0ce79fb 61/64: Replace obsolete `defadvice` with `advice-add`, Stefan Monnier, 2023/08/28
- [nongnu] scratch/el-mock 80ded09125 64/64: Make `mocklet` better compatible with `lexical-binding`, Stefan Monnier, 2023/08/28