aboutsummaryrefslogtreecommitdiff
path: root/compat-tests.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-05-05 21:26:25 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2024-05-05 21:31:29 +0200
commit694647ff667706812d8b3e3c0cd795541673f765 (patch)
treeb2e13ec49e5e989763b3d41e06d23ee329f79e72 /compat-tests.el
parentd08ecc3191c527247d918c43a86ec99c4059e2f9 (diff)
compat-30: Add drop
Diffstat (limited to 'compat-tests.el')
-rw-r--r--compat-tests.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/compat-tests.el b/compat-tests.el
index d885425..6270f8c 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -957,6 +957,12 @@
(should-equal '(1 2) (take 5 '(1 2)))
(should-equal '(1 2 3) (take 3 '(1 2 3 4))))
+(ert-deftest compat-drop ()
+ (static-if (< emacs-major-version 30) ;; TODO reenable if available on CI
+ (progn
+ (should-not (drop 5 nil))
+ (should-equal '(3 4 5) (drop 2 '(1 2 3 4 5))))))
+
(ert-deftest compat-format-message ()
(should-equal (format-message "a=%s b=%s" 1 2) "a=1 b=2"))