]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix test errors when run with fancy charset (bug#61534)
authorMattias Engdegård <mattiase@acm.org>
Thu, 16 Feb 2023 09:03:30 +0000 (10:03 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 16 Feb 2023 09:09:25 +0000 (10:09 +0100)
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals, test-suppression):
Bind `text-quoting-style` to `grave` around tests to force
generation of ASCII quotes.
* test/src/lread-tests.el (lread-tests--unescaped-char-literals):
Subject the reference string to the same text styling as that
under scrutiny.

test/lisp/emacs-lisp/bytecomp-tests.el
test/src/lread-tests.el

index 2fdf7389fc1fc6bb83cfaeb78a81a5740b4bd1b1..4b0a714e52d01904f3e1a556c042acba18d798e1 100644 (file)
@@ -1213,7 +1213,8 @@ byte-compiled.  Run with dynamic binding."
 literals (Bug#20852)."
   (should (boundp 'lread--unescaped-character-literals))
   (let ((byte-compile-error-on-warn t)
-        (byte-compile-debug t))
+        (byte-compile-debug t)
+        (text-quoting-style 'grave))
     (bytecomp-tests--with-temp-file source
       (write-region "(list ?) ?( ?; ?\" ?[ ?])" nil source)
       (bytecomp-tests--with-temp-file destination
@@ -1332,6 +1333,7 @@ literals (Bug#20852)."
 
 (defun test-suppression (form suppress match)
   (let ((lexical-binding t)
+        (text-quoting-style 'grave)
         (byte-compile-log-buffer (generate-new-buffer " *Compile-Log*")))
     ;; Check that we get a warning without suppression.
     (with-current-buffer byte-compile-log-buffer
index 459a06a39b6403d1687844a527ab941c240fa235..c0ea37d2c554957b3f66fb2729a78d7a678e5fac 100644 (file)
@@ -137,11 +137,13 @@ literals (Bug#20852)."
     (write-region "?) ?( ?; ?\" ?[ ?]" nil file-name)
     (should (equal (load file-name nil :nomessage :nosuffix) t))
     (should (equal (lread-tests--last-message)
-                   (concat (format-message "Loading `%s': " file-name)
-                           "unescaped character literals "
-                           "`?\"', `?(', `?)', `?;', `?[', `?]' detected, "
-                           "`?\\\"', `?\\(', `?\\)', `?\\;', `?\\[', `?\\]' "
-                           "expected!")))))
+                   (format-message
+                    (concat "Loading `%s': "
+                            "unescaped character literals "
+                            "`?\"', `?(', `?)', `?;', `?[', `?]' detected, "
+                            "`?\\\"', `?\\(', `?\\)', `?\\;', `?\\[', `?\\]' "
+                            "expected!")
+                    file-name)))))
 
 (ert-deftest lread-test-bug26837 ()
   "Test for https://debbugs.gnu.org/26837 ."