aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2025-03-08 16:25:06 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2025-03-08 16:25:06 +0100
commit60328dd15dc944f4f16b5cbea8f18a95e037655a (patch)
tree6becccd98dea66c3fbb49fa81e2228b04d1a3223
parent38e6e2cf2eac85213927f4918ec3bb8fdd39a638 (diff)
compat-tests: Improve completion-list-candidate-at-point test
-rw-r--r--compat-tests.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/compat-tests.el b/compat-tests.el
index b765b57..9ab54a6 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -3077,10 +3077,12 @@
(with-current-buffer "*Completions*"
(goto-char (point-min))
(search-forward ":")
+ (should-not (completion-list-candidate-at-point))
(forward-line 1)
- (should-equal "first" (car (completion-list-candidate-at-point)))
- (should (integerp (nth 1 (completion-list-candidate-at-point))))
- (should (integerp (nth 2 (completion-list-candidate-at-point)))))))
+ (let ((cand (completion-list-candidate-at-point)))
+ (should-equal "first" (car cand))
+ (should (integerp (nth 1 cand)))
+ (should-equal (+ 5 (nth 1 cand)) (nth 2 cand))))))
(ert-deftest compat-untrusted-content ()
(should (local-variable-if-set-p 'untrusted-content)))