]> git.eshelyaron.com Git - emacs.git/commitdiff
test/lisp/progmodes/python-tests.el: add test for nav end of block
authorTom Gillespie <tgbugs@gmail.com>
Wed, 29 Jun 2022 02:55:31 +0000 (19:55 -0700)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 29 Jun 2022 10:13:34 +0000 (12:13 +0200)
Add test for python-nav-end-of-block to prevent regression of bug#56271.

test/lisp/progmodes/python-tests.el

index e17bc0df92534b6c9950d0c6227db8f2e878304b..c59a2e795337c106d082d1aeb29c29b170a68d6d 100644 (file)
@@ -2565,6 +2565,18 @@ def decoratorFunctionWithArguments(arg1, arg2, arg3):
                 (python-tests-look-at "print 'After f(*args)'")
                 (line-end-position))))))
 
+(ert-deftest python-nav-end-of-block-2 ()
+  "Ensure that `python-nav-end-of-block' does not enter an infinite loop."
+  (python-tests-with-temp-buffer
+   "def
+    =''
+ '
+\"\"\"\"\"\"
+ #
+''
+"
+   (python-nav-end-of-block)))
+
 (ert-deftest python-nav-forward-block-1 ()
   "This also accounts as a test for `python-nav-backward-block'."
   (python-tests-with-temp-buffer