summaryrefslogtreecommitdiff
path: root/test/automated
diff options
context:
space:
mode:
Diffstat (limited to 'test/automated')
-rw-r--r--test/automated/sort-tests.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/automated/sort-tests.el b/test/automated/sort-tests.el
index 52973297818..f3a182cdc14 100644
--- a/test/automated/sort-tests.el
+++ b/test/automated/sort-tests.el
@@ -40,8 +40,10 @@
(funcall function reverse (point-min) (point-max))
(let ((sorted-words
(mapconcat #'identity
- (let ((x (sort (copy-sequence words) less-predicate)))
- (if reverse (reverse x) x))
+ (sort (copy-sequence words)
+ (if reverse
+ (lambda (a b) (funcall less-predicate b a))
+ less-predicate))
separator)))
(should (string= (substring (buffer-string) 0 -1) sorted-words)))))