From 60328dd15dc944f4f16b5cbea8f18a95e037655a Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sat, 8 Mar 2025 16:25:06 +0100 Subject: compat-tests: Improve completion-list-candidate-at-point test --- compat-tests.el | 8 +++++--- 1 file 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))) -- cgit v1.0