[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 337c32e588 12/13: Restore regexp tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 337c32e588 12/13: Restore regexp tests |
Date: |
Wed, 4 Jan 2023 11:57:31 -0500 (EST) |
branch: externals/compat
commit 337c32e588d0aa064220162cb548c234aae8f982
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Restore regexp tests
---
compat-tests.el | 42 ++++++++++++++++--------------------------
1 file changed, 16 insertions(+), 26 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index 3a2e995d2b..e2739e55a5 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1639,32 +1639,22 @@
(should-equal 29 (date-days-in-month 2020 2))
(should-equal 28 (date-days-in-month 2021 2)))
-;; (ert-deftest regexp-opt ()
-;; ;; Ensure `regexp-opt' doesn't change the existing
-;; ;; behaviour:
-;; (should-equal (regexp-opt '("a" "b" "c")) '("a" "b" "c"))
-;; (should-equal (regexp-opt '("abc" "def" "ghe")) '("abc" "def" "ghe"))
-;; (should-equal (regexp-opt '("a" "b" "c") 'words) '("a" "b" "c") 'words)
-;; ;; Test empty list:
-;; (should-equal "\\(?:\\`a\\`\\)" '())
-;; (should-equal "\\<\\(\\`a\\`\\)\\>" '() 'words))
-
-;; (ert-deftest regexp-opt ()
-;; (let ((unmatchable "\\(?:\\`a\\`\\)"))
-;; (dolist (str '("" ;empty string
-;; "a" ;simple string
-;; "aaa" ;longer string
-;; ))
-;; (should-not (string-match-p unmatchable str)))))
-
-;; (ert-deftest regexp-unmatchable ()
-;; (dolist (str '("" ;empty string
-;; "a" ;simple string
-;; "aaa" ;longer string
-;; ))
-;; (should-not (string-match-p (with-no-warnings
compat--t-regexp-unmatchable) str))
-;; (when (boundp 'regexp-unmatchable)
-;; (should-not (string-match-p regexp-unmatchable str)))))
+(ert-deftest regexp-opt ()
+ ;; Ensure `regexp-opt' doesn't change the existing
+ ;; behaviour:
+ (should-equal "[abc]" (compat-call regexp-opt '("a" "b" "c")))
+ (should-equal "\\(?:abc\\|def\\|ghe\\)" (compat-call regexp-opt '("abc"
"def" "ghe")))
+ (should-equal "\\<\\([abc]\\)\\>" (compat-call regexp-opt '("a" "b" "c")
'words))
+ ;; Test empty list:
+ (should-equal "\\(?:\\`a\\`\\)" (compat-call regexp-opt '()))
+ (should-equal "\\<\\(\\`a\\`\\)\\>" (compat-call regexp-opt '() 'words)))
+
+(ert-deftest regexp-unmatchable ()
+ (dolist (str '("" ;empty string
+ "a" ;simple string
+ "aaa" ;longer string
+ ))
+ (should-not (string-match-p regexp-unmatchable str))))
;; TODO func-arity seems broken
;; (ert-deftest func-arity
- [elpa] externals/compat updated (241e38bb45 -> 18a83e1dff), ELPA Syncer, 2023/01/04
- [elpa] externals/compat c2e0835dd3 03/13: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 1b1d633c78 01/13: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat c314cdf427 02/13: Remove realnames, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 20d103c09c 09/13: Restore if-let* test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat b97b756871 07/13: Restore if-let test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 414135b6f9 06/13: Restore and-let test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 639d03eed7 04/13: Restore date tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 27ad893406 05/13: Update version number, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 79d3562f6d 11/13: Add when-let test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 337c32e588 12/13: Restore regexp tests,
ELPA Syncer <=
- [elpa] externals/compat 18a83e1dff 13/13: Add UNTESTED labels behind compat-defuns for greppability, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 8a479d7b52 10/13: Add when-let* test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat efb1d1c081 08/13: Disable broken test, ELPA Syncer, 2023/01/04