summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2023-04-13 17:35:45 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2023-04-13 17:35:45 +0200
commitd590af749f18ea3b82e46bb498568c77a2640d29 (patch)
tree13c35f37a032d11248214c5f98eab4e5aa896c05 /test
parentabb43a62365b378b27a85456db42dfa34d2ad760 (diff)
downloademacs-d590af749f18ea3b82e46bb498568c77a2640d29.tar.gz
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.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/simple-tests.el6
1 files 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 ()