[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat fa09ea0 54/99: Factor out multibyte regexp tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat fa09ea0 54/99: Factor out multibyte regexp tests for string-search and -replace |
Date: |
Sun, 17 Oct 2021 05:57:56 -0400 (EDT) |
branch: externals/compat
commit fa09ea09b63353756e3fa665df95f77a7bcfcc17
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Factor out multibyte regexp tests for string-search and -replace
---
compat-tests.el | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index 22b3414..2825dfd 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -211,7 +211,6 @@ the compatibility function."
(compat--should nil (make-string 1 255) "a\377ø")
(compat--should nil (make-string 1 255) "a\377a")
(compat--should 3 "fóo" "zotfóo")
- (compat--should 2 (string-to-multibyte "\377") "ab\377c")
(compat--should nil "\303" "aøb")
(compat--should nil "\270" "aøb")
(compat--should nil "ø" "\303\270")
@@ -252,10 +251,16 @@ the compatibility function."
(compat--should nil
(string-to-multibyte "\370")
(string-to-multibyte "\303\270"))
- (compat--should 2
- (string-to-multibyte "o\303\270")
- "foo\303\270")
- (compat--should 3 "\303\270" "foo\303\270")))
+ (compat--should 3 "\303\270" "foo\303\270")
+ (when (version<= "27" emacs-version)
+ ;; FIXME The commit a1f76adfb03c23bb4242928e8efe6193c301f0c1 in
+ ;; emacs.git fixes the behaviour of regular expressions matching
+ ;; raw bytes. The compatibility functions should updated to
+ ;; backport this behaviour.
+ (compat--should 2 (string-to-multibyte "\377") "ab\377c")
+ (compat--should 2
+ (string-to-multibyte "o\303\270")
+ "foo\303\270"))))
(ert-deftest compat-string-replace ()
"Check if `string-replace' was implemented correctly."
@@ -275,8 +280,14 @@ the compatibility function."
(compat--should "labarbarbarzot" "fo" "bar" "lafofofozot")
(compat--should "axb" "\377" "x" "a\377b")
(compat--should "axø" "\377" "x" "a\377ø")
- (compat--should "axb" (string-to-multibyte "\377") "x" "a\377b")
- (compat--should "axø" (string-to-multibyte "\377") "x" "a\377ø")
+ (when (version<= "27" emacs-version)
+ ;; FIXME The commit a1f76adfb03c23bb4242928e8efe6193c301f0c1
+ ;; in emacs.git fixes the behaviour of regular
+ ;; expressions matching raw bytes. The compatibility
+ ;; functions should updated to backport this
+ ;; behaviour.
+ (compat--should "axb" (string-to-multibyte "\377") "x" "a\377b")
+ (compat--should "axø" (string-to-multibyte "\377") "x" "a\377ø"))
(compat--should "ANAnas" "ana" "ANA" "ananas")
(compat--should "" "a" "" "")
(compat--should "" "a" "" "aaaaa")
- [elpa] externals/compat cb339dd 31/99: Add :cond where applicable, (continued)
- [elpa] externals/compat cb339dd 31/99: Add :cond where applicable, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 2d50e5c 32/99: Implement func-arity, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 36ef438 35/99: Implement and use mounted-file-systems, ELPA Syncer, 2021/10/17
- [elpa] externals/compat e5a573f 37/99: Declare mouse-set-point, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 2089c90 41/99: Declare gensym for with-existing-directory, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 2faab78 42/99: Add debug specification for setq-local, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 5e7698c 45/99: Avoid testing advice compatibility in version to old to compare, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 343bcbb 46/99: Fix if-let implementation, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 32031ea 50/99: Remove unnecessary compat-- prefix from gensym-counter, ELPA Syncer, 2021/10/17
- [elpa] externals/compat f8f4a9f 52/99: Use right function in some compat-maxargs-/= invocations, ELPA Syncer, 2021/10/17
- [elpa] externals/compat fa09ea0 54/99: Factor out multibyte regexp tests for string-search and -replace,
ELPA Syncer <=
- [elpa] externals/compat aa112d8 63/99: Implement lookup-key handling of keymap lists, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 86fb58f 64/99: Move compat--alist-get-full-elisp to emacs-25.1, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 954c97b 67/99: Update compat-tests header, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 5cd751b 68/99: Mention GitHub issue tracker in README, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 598a040 69/99: Add :cond check to lookup-key, ELPA Syncer, 2021/10/17
- [elpa] externals/compat b16122b 71/99: Use explicit symbol names instead of alii, ELPA Syncer, 2021/10/17
- [elpa] externals/compat a7d9649 72/99: Manually advise functions when nadvice is not available, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 904d660 74/99: Add documentation to manual advice wrapper, ELPA Syncer, 2021/10/17
- [elpa] externals/compat e689153 76/99: Merge compile and run into one GitHub Action job, ELPA Syncer, 2021/10/17
- [elpa] externals/compat c37e1d1 80/99: Fix quoting in compat-macs' legacy advice installation, ELPA Syncer, 2021/10/17