From: Mattias EngdegÄrd Date: Thu, 13 Apr 2023 15:35:45 +0000 (+0200) Subject: Stronger checking in line-number-at-pos tests X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d590af749f18ea3b82e46bb498568c77a2640d29;p=emacs.git 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. --- 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 ()