summaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-01-22 11:02:50 +0000
committerAlan Mackenzie <acm@muc.de>2022-01-22 11:02:50 +0000
commit14d64a8adcc866deecd758b898e8ef2d836b354a (patch)
tree83cff9669e266f8e283ccb8cd7518e909240f1e1 /test/src
parentbdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (diff)
parentebe334cdc234de2897263aed4c05ac7088c11857 (diff)
downloademacs-scratch/correct-warning-pos.tar.gz
Merge branch 'master' into scratch/correct-warning-posscratch/correct-warning-pos
Diffstat (limited to 'test/src')
-rw-r--r--test/src/syntax-tests.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/src/syntax-tests.el b/test/src/syntax-tests.el
index 3b9f21cde37..751a900a23e 100644
--- a/test/src/syntax-tests.el
+++ b/test/src/syntax-tests.el
@@ -506,4 +506,19 @@ the `parse-partial-sexp's are expected to stop. See
(should (parse-partial-sexp 1 1))
(should-error (parse-partial-sexp 2 1))))
+(ert-deftest syntax-char-syntax ()
+ ;; Verify that char-syntax behaves identically in interpreted and
+ ;; byte-compiled code (bug#53260).
+ (let ((cs (byte-compile (lambda (x) (char-syntax x)))))
+ ;; Use a unibyte buffer with a syntax table using symbol syntax
+ ;; for raw byte 128.
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (let ((st (make-syntax-table)))
+ (modify-syntax-entry (unibyte-char-to-multibyte 128) "_" st)
+ (set-syntax-table st)
+ (should (equal (eval '(char-syntax 128) t) ?_))
+ (should (equal (funcall cs 128) ?_))))
+ (list (char-syntax 128) (funcall cs 128))))
+
;;; syntax-tests.el ends here