[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 7817dbc 122/346: d-mode-test: Announce mismatched v
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 7817dbc 122/346: d-mode-test: Announce mismatched values of inline tests |
Date: |
Sun, 29 Aug 2021 11:00:15 -0400 (EDT) |
branch: elpa/d-mode
commit 7817dbc040da57289901f82250324cd5a083a050
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
d-mode-test: Announce mismatched values of inline tests
---
d-mode-test.el | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index 1347254..d61a759 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -178,7 +178,7 @@
(testbuf (make-test-buffer filename))
(pop-up-windows t)
(linenum 1)
- error-found-p
+ error-found
expectedindent
c-echo-syntactic-information-p)
@@ -190,25 +190,25 @@
(match-string 1 contents)))
(out-str (if (string-match "^// #out: \\(.+\\)$" contents)
(match-string 1 contents))))
- (if run-str
- (let ((result (eval (car (read-from-string run-str)))))
- (when out-str
- (let ((expect (car (read-from-string out-str))))
- (if (not (equal result expect))
- (setq error-found-p t)))))))
-
- (when error-found-p
+ (when run-str
+ (let ((result (eval (car (read-from-string run-str)))))
+ (when out-str
+ (let ((expect (car (read-from-string out-str))))
+ (unless (equal result expect)
+ (setq error-found (format "\nExpected: %s\nGot : %s" expect
result))))))))
+
+ (when error-found
(set-buffer testbuf)
(buffer-enable-undo testbuf)
(set-buffer-modified-p nil)
- (error "Regression found in file %s" filename))
+ (error "Regression found in file %s: %s" filename error-found))
(set-buffer save-buf)
(goto-char save-point)
- (when (and (not error-found-p) (interactive-p))
+ (when (and (not error-found) (interactive-p))
(kill-test-buffer))
- (not error-found-p)))
+ (not error-found)))
;; Run the tests
(ert-deftest d-mode-basic ()
- [nongnu] elpa/d-mode d14a001 239/346: Fix imenu false positive for static imports, (continued)
- [nongnu] elpa/d-mode d14a001 239/346: Fix imenu false positive for static imports, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8606775 240/346: Fix imenu jump position for new-style aliases, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1908f59 236/346: Speed up imenu a bit, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 627a6f8 273/346: Move c-forward-decl-or-cast-1 into d-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e9278a9 114/346: Reimplement compilation-mode error message detection for DMD, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode aff84c6 115/346: update support for Emacs 25, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a564656 116/346: Merge pull request #71 from brdjns/patch-1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 23a3661 119/346: Merge pull request #72 from nordlow/fix-d-exceptions-regexp, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e5d21be 121/346: README: Update shield images and links to use official project repository, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 576dd29 123/346: tests: Actually test compilation-mode error list correctness, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 7817dbc 122/346: d-mode-test: Announce mismatched values of inline tests,
ELPA Syncer <=
- [nongnu] elpa/d-mode 8ccad32 136/346: Simplify cascaded call indentation setup, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0b8ed61 152/346: Fix highlighting of const variable declarations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 593e3f5 155/346: Fix extern(C) functions omitted from imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 93a62b3 158/346: Fix imenu for functions returning types containing parens, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a4f0b2d 161/346: Fix imenu for functions prefixed with a version/else, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8771a86 162/346: Convert d-imenu-generic-expression to rx, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 908d55b 170/346: fix #49 - Occasional incorrect fontification of string literals due, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode dea775a 066/346: Merge pull request #35 from wrzoski/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 01997e0 070/346: Add LDC compiler message pattern to be recognized in compilation mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 38ddb5a 076/346: Merge pull request #41 from dmakarov/master, ELPA Syncer, 2021/08/29