diff options
| author | Noam Postavsky <npostavs@gmail.com> | 2018-06-02 16:22:17 -0400 |
|---|---|---|
| committer | Noam Postavsky <npostavs@gmail.com> | 2018-06-16 18:34:19 -0400 |
| commit | 05345babc988060cca540770599282102c34f2a7 (patch) | |
| tree | e9bef969663372264d34621e03106db997118916 /test/lisp/progmodes/python-tests.el | |
| parent | 92b609c572c127b6c6616413549809ff20ee30c1 (diff) | |
| download | emacs-05345babc988060cca540770599282102c34f2a7.tar.gz | |
Fix off by one error in python-mode assertion (Bug#30964)
* lisp/progmodes/python.el (python-nav-end-of-statement): Don't assert
that string-start is strictly greater than last-string-end, because
the string end is a position outside of the string and may therefore
be the same as the following string's start.
* test/lisp/progmodes/python-tests.el (python-nav-end-of-statement-2):
New test.
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 1c4d22d72fa..0b9f8484c10 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -2004,6 +2004,12 @@ string (python-util-forward-comment -1) (point)))))) +(ert-deftest python-nav-end-of-statement-2 () + "Test the string overlap assertion (Bug#30964)." + (python-tests-with-temp-buffer + "'\n''\n" + (python-nav-end-of-statement))) + (ert-deftest python-nav-forward-statement-1 () (python-tests-with-temp-buffer " |
