emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/relint d00da3f428: Fix tests on Emacs master (30.0) whe


From: ELPA Syncer
Subject: [elpa] externals/relint d00da3f428: Fix tests on Emacs master (30.0) where "\x" is an error
Date: Fri, 24 Mar 2023 09:30:26 -0400 (EDT)

branch: externals/relint
commit d00da3f42811dd8f6db734d6eaa1510b330bab14
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Mattias EngdegÄrd <mattiase@acm.org>

    Fix tests on Emacs master (30.0) where "\x" is an error
---
 relint-test.el   | 22 ++++++++++++++++++++++
 test/13.elisp    |  3 +--
 test/13.expected |  2 --
 3 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/relint-test.el b/relint-test.el
index 8b4bd66042..14f057edd6 100644
--- a/relint-test.el
+++ b/relint-test.el
@@ -164,4 +164,26 @@ and a path."
            '(("Ineffective string escape `\\?'" 16 nil nil nil warning)
              ("Ineffective string escape `\\!'" 1288960 nil nil nil 
warning)))))
 
+(ert-deftest relint-bad-hex-escape ()
+  ;; Test the bad \x character escape warning. We do this separately because
+  ;; it signals an error in newer Emacs.
+  (let ((buf (get-buffer-create " *relint-test*"))
+        (text-quoting-style 'grave))
+    (unwind-protect
+        (progn
+          (with-current-buffer buf
+            (emacs-lisp-mode)
+            (insert "(print \"c \\xf \\xg \\x d\")\n"))
+          (let* ((diags (relint-buffer buf))
+                 (err (assoc "(error \"Invalid escape character syntax\")"
+                             diags)))
+            (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)
+                     )))))
+      (kill-buffer buf))))
+
 (provide 'relint-test)
diff --git a/test/13.elisp b/test/13.elisp
index d07f72fbd2..3cce7c6106 100644
--- a/test/13.elisp
+++ b/test/13.elisp
@@ -19,5 +19,4 @@ and \a \b \f \n \r \t \v \d \e \s \^P"))
   '("bracketed \q string"))
 
 (defun f3 ()
-  (print "a \7 \8 \9 b")
-  (print "c \xf \xg \x d"))
+  (print "a \7 \8 \9 b"))
diff --git a/test/13.expected b/test/13.expected
index 1bf32daa53..27298a44ca 100644
--- a/test/13.expected
+++ b/test/13.expected
@@ -28,5 +28,3 @@
 13.elisp:19:16: Ineffective string escape `\q'
 13.elisp:22:16: Ineffective string escape `\8'
 13.elisp:22:19: Ineffective string escape `\9'
-13.elisp:23:17: Character escape `\x' not followed by hex digit
-13.elisp:23:21: Character escape `\x' not followed by hex digit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]