diff options
| -rw-r--r-- | test/automated/python-tests.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 5b77a1db49a..5bddfe845ed 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el | |||
| @@ -2089,6 +2089,23 @@ def f(): | |||
| 2089 | (python-nav-backward-up-list) | 2089 | (python-nav-backward-up-list) |
| 2090 | (should (looking-at "def f():")))) | 2090 | (should (looking-at "def f():")))) |
| 2091 | 2091 | ||
| 2092 | (ert-deftest python-indent-dedent-line-backspace-1 () | ||
| 2093 | "Check de-indentation on first call. Bug#18319." | ||
| 2094 | (python-tests-with-temp-buffer | ||
| 2095 | " | ||
| 2096 | if True: | ||
| 2097 | x () | ||
| 2098 | if False: | ||
| 2099 | " | ||
| 2100 | (python-tests-look-at "if False:") | ||
| 2101 | (call-interactively #'python-indent-dedent-line-backspace) | ||
| 2102 | (should (zerop (current-indentation))) | ||
| 2103 | ;; XXX: This should be a call to `undo' but it's triggering errors. | ||
| 2104 | (insert " ") | ||
| 2105 | (should (= (current-indentation) 4)) | ||
| 2106 | (call-interactively #'python-indent-dedent-line-backspace) | ||
| 2107 | (should (zerop (current-indentation))))) | ||
| 2108 | |||
| 2092 | 2109 | ||
| 2093 | ;;; Shell integration | 2110 | ;;; Shell integration |
| 2094 | 2111 | ||