aboutsummaryrefslogtreecommitdiff
path: root/compat-tests.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2023-04-19 15:33:16 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2023-04-19 15:33:16 +0200
commitbc4739eb1e88c6c409f83e4e471e5d0472792ad8 (patch)
treee6fce116da92fd4596bd35cfd39f20cd5eb0704c /compat-tests.el
parentb9b6be100970524667fc4a30f8915d078a97b855 (diff)
compat-tests: Fix sort warning on Emacs 30
Diffstat (limited to 'compat-tests.el')
-rw-r--r--compat-tests.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/compat-tests.el b/compat-tests.el
index 7312123..981aab0 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1750,8 +1750,9 @@
(should-equal [1 2 3] (compat-call sort [1 3 2] #'<))
(should-equal [1 2 3] (compat-call sort [3 2 1] #'<))
;; Test side effect
- (let ((vec [4 5 8 3 1 2 3 2 3 4]))
- (compat-call sort vec #'>)
+ (let* ((vec [4 5 8 3 1 2 3 2 3 4])
+ (sorted (compat-call sort vec #'>)))
+ (should-equal sorted [8 5 4 4 3 3 3 2 2 1])
(should-equal vec [8 5 4 4 3 3 3 2 2 1])))
(ert-deftest compat-replace-string-in-region ()