branch: externals/relint
commit 62321cb0e2efd9a2b85994ed9383c070f3a922dc
Merge: 290807bcbf 17152be9d4
Author: mattiase <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #13 from basil-conto/blc/master
Fix tests with ?\x error on Emacs master (30.0)
---
relint-test.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/relint-test.el b/relint-test.el
index 14f057edd6..0c1cbf9c92 100644
--- a/relint-test.el
+++ b/relint-test.el
@@ -175,15 +175,17 @@ and a path."
(emacs-lisp-mode)
(insert "(print \"c \\xf \\xg \\x d\")\n"))
(let* ((diags (relint-buffer buf))
- (err (assoc "(error \"Invalid escape character syntax\")"
- diags)))
+ (err (condition-case err
+ (read-from-string "?\\x")
+ (error (prin1-to-string err)))))
(should (equal
- (remove err diags)
- '(("Character escape `\\x' not followed by hex digit"
- 15 nil nil nil warning)
- ("Character escape `\\x' not followed by hex digit"
- 19 nil nil nil warning)
- )))))
+ ;; Ignore 'invalid escape char syntax' error.
+ (remove (assoc err diags) diags)
+ '(("Character escape `\\x' not followed by hex digit"
+ 15 nil nil nil warning)
+ ("Character escape `\\x' not followed by hex digit"
+ 19 nil nil nil warning)
+ )))))
(kill-buffer buf))))
(provide 'relint-test)