[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat b962db5a24 5/8: Test string-equal-ignore-case
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat b962db5a24 5/8: Test string-equal-ignore-case |
Date: |
Wed, 4 Jan 2023 14:57:26 -0500 (EST) |
branch: externals/compat
commit b962db5a240a543132d02822f5c6f56da0e4b483
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Test string-equal-ignore-case
---
compat-29.el | 2 +-
compat-tests.el | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/compat-29.el b/compat-29.el
index 48470d49f7..3d16539290 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -99,7 +99,7 @@ If N is greater or equal to the length of LIST, return LIST
(or a copy)."
(setq n (1- n)))
(nreverse copy)))
-(compat-defun string-equal-ignore-case (string1 string2) ;; <UNTESTED>
+(compat-defun string-equal-ignore-case (string1 string2) ;; <OK>
"Like `string-equal', but case-insensitive.
Upper-case and lower-case letters are treated as equal.
Unibyte strings are converted to multibyte for comparison."
diff --git a/compat-tests.el b/compat-tests.el
index 77833e5d57..64eca34ed3 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -870,6 +870,13 @@
(should-equal '[1 2 3] (compat-call sort '[1 2 3] #'<))
(should-equal '[1 2 3] (compat-call sort '[3 2 1] #'<)))
+(ert-deftest string-equal-ignore-case ()
+ (should (string-equal-ignore-case "abc" "abc"))
+ (should (string-equal-ignore-case "abc" "ABC"))
+ (should (string-equal-ignore-case "abc" "abC"))
+ (should-not (string-equal-ignore-case "abc" "abCD"))
+ (should (string-equal-ignore-case "S" "s")))
+
(ert-deftest string-greaterp ()
(should (string-greaterp "b" "a"))
(should-not (string-greaterp "a" "b"))
- [elpa] externals/compat updated (f0362f354c -> 01af99d1a4), ELPA Syncer, 2023/01/04
- [elpa] externals/compat 02fddfb82f 7/8: Update news, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 01af99d1a4 8/8: Update news, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 0803473abf 2/8: Add trivial tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 55dbac40bf 3/8: Add trivial tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 7e697a35f8 4/8: Fix tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat b962db5a24 5/8: Test string-equal-ignore-case,
ELPA Syncer <=
- [elpa] externals/compat ec19e4e918 1/8: compat-macs: Require subr-x, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 6d8f1aefd0 6/8: Test file-attribute-collect, ELPA Syncer, 2023/01/04