diff options
| author | Noam Postavsky | 2018-06-02 16:22:17 -0400 |
|---|---|---|
| committer | Noam Postavsky | 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 emacs-05345babc988060cca540770599282102c34f2a7.zip | |
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 | |||
| 2004 | (python-util-forward-comment -1) | 2004 | (python-util-forward-comment -1) |
| 2005 | (point)))))) | 2005 | (point)))))) |
| 2006 | 2006 | ||
| 2007 | (ert-deftest python-nav-end-of-statement-2 () | ||
| 2008 | "Test the string overlap assertion (Bug#30964)." | ||
| 2009 | (python-tests-with-temp-buffer | ||
| 2010 | "'\n''\n" | ||
| 2011 | (python-nav-end-of-statement))) | ||
| 2012 | |||
| 2007 | (ert-deftest python-nav-forward-statement-1 () | 2013 | (ert-deftest python-nav-forward-statement-1 () |
| 2008 | (python-tests-with-temp-buffer | 2014 | (python-tests-with-temp-buffer |
| 2009 | " | 2015 | " |