summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/pascal-tests.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2020-06-21 21:11:17 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2020-06-22 09:51:17 +0200
commit62426057310b2332037a26e6f70cd5cc8b2e3a11 (patch)
tree3379cf1077cd25b4c04f1a02956d3344ce3f8ad8 /test/lisp/progmodes/pascal-tests.el
parent73daab99914b4972a7cd167b03102be4c68e83e5 (diff)
downloademacs-62426057310b2332037a26e6f70cd5cc8b2e3a11.tar.gz
Fix spurious error in beginning-of-defun in pascal-mode (bug#41740)
* lisp/progmodes/pascal.el (pascal-beg-of-defun): Ignore errors in forward-sexp. * test/lisp/progmodes/pascal-tests.el (pascal-beg-of-defun): New test.
Diffstat (limited to 'test/lisp/progmodes/pascal-tests.el')
-rw-r--r--test/lisp/progmodes/pascal-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/progmodes/pascal-tests.el b/test/lisp/progmodes/pascal-tests.el
index 10d6e0433d0..ed4c6fb03e0 100644
--- a/test/lisp/progmodes/pascal-tests.el
+++ b/test/lisp/progmodes/pascal-tests.el
@@ -52,4 +52,12 @@
(should (equal completions nil))
(should (equal point-before point-after))))))
+(ert-deftest pascal-beg-of-defun ()
+ (with-temp-buffer
+ (pascal-mode)
+ (insert "program test; procedure p(")
+ (forward-char -1)
+ (pascal-beg-of-defun)
+ (should (equal (point) 15))))
+
(provide 'pascal-tests)