summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/python-tests.el
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@dancol.org>2016-11-08 15:26:43 -0800
committerDaniel Colascione <dancol@dancol.org>2016-11-08 15:26:43 -0800
commit112111c4e489aae5cbe241ffa458d97b6a133d3a (patch)
tree3de7ef225d0b2bd30eb475067851aacf89fd7fd0 /test/lisp/progmodes/python-tests.el
parent06cfaa3dfa1888b55df437a16ced6f718678bc56 (diff)
downloademacs-112111c4e489aae5cbe241ffa458d97b6a133d3a.tar.gz
emacs-112111c4e489aae5cbe241ffa458d97b6a133d3a.tar.bz2
emacs-112111c4e489aae5cbe241ffa458d97b6a133d3a.zip
Avoid infloop in python
Fix bug#24905 * lisp/progmodes/python.el (python-info-docstring-p): Improve infloop avoidance: replace (bobp) with generic test for forward progress. * test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid): Add test for bug#24905
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
-rw-r--r--test/lisp/progmodes/python-tests.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index 54ed92212b8..f6564dd58cc 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -2452,6 +2452,13 @@ if x:
(line-beginning-position) (line-end-position))
"abcdef")))))
+(ert-deftest python-bob-infloop-avoid ()
+ "Test that strings at BOB don't confuse syntax analysis. Bug#24905"
+ (python-tests-with-temp-buffer
+ " \"\n"
+ (goto-char (point-min))
+ (font-lock-fontify-buffer)))
+
;;; Shell integration