diff options
| author | Michael R. Mauger | 2017-04-02 18:10:57 -0400 |
|---|---|---|
| committer | Michael R. Mauger | 2017-04-02 18:10:57 -0400 |
| commit | 77083e2d34ba5559ae2899d3b03cf08c2e6c5ad4 (patch) | |
| tree | 27da92c2a61d664b700860c2d527a4d36000ca37 /test/lisp/progmodes/python-tests.el | |
| parent | c5a31f8292c94d19b80a3dbe0b3026693cc1090e (diff) | |
| parent | 8e394a7f35c2ba9297d222faa2689e177f268924 (diff) | |
| download | emacs-77083e2d34ba5559ae2899d3b03cf08c2e6c5ad4.tar.gz emacs-77083e2d34ba5559ae2899d3b03cf08c2e6c5ad4.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 1e6b867d30b..2f4c2fb849d 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -5314,6 +5314,25 @@ class SomeClass: | |||
| 5314 | (or enabled (hs-minor-mode -1))))) | 5314 | (or enabled (hs-minor-mode -1))))) |
| 5315 | 5315 | ||
| 5316 | 5316 | ||
| 5317 | (ert-deftest python-tests--python-nav-end-of-statement--infloop () | ||
| 5318 | "Checks that `python-nav-end-of-statement' doesn't infloop in a | ||
| 5319 | buffer with overlapping strings." | ||
| 5320 | (python-tests-with-temp-buffer "''' '\n''' ' '\n" | ||
| 5321 | (syntax-propertize (point-max)) | ||
| 5322 | ;; Create a situation where strings nominally overlap. This | ||
| 5323 | ;; shouldn't happen in practice, but apparently it can happen when | ||
| 5324 | ;; a package calls `syntax-ppss' in a narrowed buffer during JIT | ||
| 5325 | ;; lock. | ||
| 5326 | (put-text-property 4 5 'syntax-table (string-to-syntax "|")) | ||
| 5327 | (remove-text-properties 8 9 '(syntax-table nil)) | ||
| 5328 | (goto-char 4) | ||
| 5329 | (setq-local syntax-propertize-function nil) | ||
| 5330 | ;; The next form should not infloop. We have to disable | ||
| 5331 | ;; ‘debug-on-error’ so that ‘cl-assert’ doesn’t call the debugger. | ||
| 5332 | (should-error (let ((debug-on-error nil)) | ||
| 5333 | (python-nav-end-of-statement))) | ||
| 5334 | (should (eolp)))) | ||
| 5335 | |||
| 5317 | 5336 | ||
| 5318 | (provide 'python-tests) | 5337 | (provide 'python-tests) |
| 5319 | 5338 | ||