aboutsummaryrefslogtreecommitdiff
path: root/compat-tests.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-02-13 07:49:27 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-02-13 07:49:27 +0100
commit89d77c8fe4238d3c0c36432548e11110de427cca (patch)
tree165cffea803b6448725ccb95e4d572470b7602e1 /compat-tests.el
parentf8a73191c657418533ec23fdd5efc84f2726ca89 (diff)
compat-tests.el: Enable sort-on test
Diffstat (limited to 'compat-tests.el')
-rw-r--r--compat-tests.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/compat-tests.el b/compat-tests.el
index 71bcc08..57a8493 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1754,13 +1754,10 @@
(should-equal '(1 2 3 4) (flatten-tree '(((1 nil)) 2 (((3 nil nil) 4))))))
(ert-deftest compat-sort-on ()
- ;; TODO enable if CI emacs 30 supports sort-on
- (static-if (< emacs-major-version 30)
- (progn
- (should-equal '(3 2 1) (sort-on '(2 1 3) #'> #'identity))
- (should-equal '(1 2 3) (sort-on [2 1 3] #'< #'identity))
- (should-equal '((1 z) (2 y) (3 x)) (sort-on (list '(2 y) '(1 z) '(3 x)) #'< #'car))
- (should-equal '((x 3) (y 2) (z 1)) (sort-on (list '(y 2) '(z 1) '(x 3)) #'> #'cadr)))))
+ (should-equal '(3 2 1) (sort-on '(2 1 3) #'> #'identity))
+ (should-equal '(1 2 3) (sort-on [2 1 3] #'< #'identity))
+ (should-equal '((1 z) (2 y) (3 x)) (sort-on (list '(2 y) '(1 z) '(3 x)) #'< #'car))
+ (should-equal '((x 3) (y 2) (z 1)) (sort-on (list '(y 2) '(z 1) '(x 3)) #'> #'cadr)))
(ert-deftest compat-sort ()
(should-equal (list 1 2 3) (sort (list 1 2 3) #'<))