branch: elpa/d-mode
commit 6417bf5c7a821486397c962c4d447d40603151c7
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
d-mode-test: Stop catching exceptions
This hides the actual back trace and makes debugging an unnecessary
pain.
Now that we use ert's :expected-result, this is also unnecessary.
---
d-mode-test.el | 36 +++++++++++++-----------------------
1 file changed, 13 insertions(+), 23 deletions(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index 4f37730..fbeb6a3 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -188,29 +188,19 @@
(switch-to-buffer testbuf)
(syntax-ppss (point-max))
- (condition-case err
- ;; extract the run command and expected output if any.
- (let* ((contents (buffer-substring-no-properties 1 (point-max)))
- (run-str (if (string-match "^// #run: \\(.+\\)$" contents)
- (match-string 1 contents)))
- (out-str (if (string-match "^// #out: \\(.+\\)$" contents)
- (match-string 1 contents))))
- (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)
- (error "\nExpected: %s\nGot : %s" expect result))))))
- t)
- (error
- (set-buffer testbuf)
- (buffer-enable-undo testbuf)
- (set-buffer-modified-p nil)
- (setq error-found-p t)
-
- (message
- "Regression found in file %s:\n%s"
- filename (error-message-string err))))
+ ;; extract the run command and expected output if any.
+ (let* ((contents (buffer-substring-no-properties 1 (point-max)))
+ (run-str (if (string-match "^// #run: \\(.+\\)$" contents)
+ (match-string 1 contents)))
+ (out-str (if (string-match "^// #out: \\(.+\\)$" contents)
+ (match-string 1 contents))))
+ (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)
+ (error "\nExpected: %s\nGot : %s" expect result))))))
+ t)
(set-buffer save-buf)
(goto-char save-point)