aboutsummaryrefslogtreecommitdiff
path: root/compat-tests.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2023-01-17 23:45:02 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2023-01-17 23:45:02 +0100
commit64dc62259f1adc6ae70a38f7a874cee48dfa3626 (patch)
tree4eb02c88df86dda53f99297de400dfd436588234 /compat-tests.el
parent897d9fbbbad2e7552137fff1bea7b9c0daa68b61 (diff)
compat-29: Add list-of-strings-p
Diffstat (limited to 'compat-tests.el')
-rw-r--r--compat-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/compat-tests.el b/compat-tests.el
index 0b928e1..a15f3f5 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -906,6 +906,14 @@
(should (string-prefix-p "compat" (symbol-name (gensym "compat"))))
(should-equal gensym-counter (+ orig 3))))
+(ert-deftest list-of-strings-p ()
+ (should-not (list-of-strings-p 1))
+ (should (list-of-strings-p nil))
+ (should (list-of-strings-p '("a" "b")))
+ (should-not (list-of-strings-p ["a" "b"]))
+ (should-not (list-of-strings-p '("a" nil "b")))
+ (should-not (list-of-strings-p '("a" "b" . "c"))))
+
(ert-deftest plistp ()
(should (plistp '(:a a :b b)))
(should (plistp '(1 2 3 4)))