[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d590af749f1 2/2: Stronger checking in line-number-at-pos tests
From: |
Mattias Engdegård |
Subject: |
master d590af749f1 2/2: Stronger checking in line-number-at-pos tests |
Date: |
Thu, 13 Apr 2023 11:37:20 -0400 (EDT) |
branch: master
commit d590af749f18ea3b82e46bb498568c77a2640d29
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Stronger checking in line-number-at-pos tests
* test/lisp/simple-tests.el (line-number-at-pos-keeps-restriction)
(line-number-at-pos-keeps-point): Check all return values.
---
test/lisp/simple-tests.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el
index 28d8120f143..7dabb735522 100644
--- a/test/lisp/simple-tests.el
+++ b/test/lisp/simple-tests.el
@@ -839,7 +839,7 @@ See Bug#21722."
(forward-line 2)
(narrow-to-region (pos-bol) (pos-eol))
(should (equal (line-number-at-pos) 1))
- (line-number-at-pos nil t)
+ (should (equal (line-number-at-pos nil t) 3))
(should (equal (line-number-at-pos) 1))))
(ert-deftest line-number-at-pos-keeps-point ()
@@ -849,8 +849,8 @@ See Bug#21722."
(goto-char (point-min))
(forward-line 2)
(setq pos (point))
- (line-number-at-pos)
- (line-number-at-pos nil t)
+ (should (equal (line-number-at-pos) 3))
+ (should (equal (line-number-at-pos nil t) 3))
(should (equal pos (point))))))
(ert-deftest line-number-at-pos-when-passing-point ()