]> git.eshelyaron.com Git - emacs.git/commitdiff
Added missing test for previous commit
authorFabián Ezequiel Gallina <fgallina@gnu.org>
Tue, 27 Jan 2015 03:35:07 +0000 (00:35 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Tue, 27 Jan 2015 03:35:07 +0000 (00:35 -0300)
test/automated/python-tests.el

index 5b77a1db49a79321445178e3d895fd884286b4fe..5bddfe845ed68c6096f742661d2799d673fbf658 100644 (file)
@@ -2089,6 +2089,23 @@ def f():
    (python-nav-backward-up-list)
    (should (looking-at "def f():"))))
 
+(ert-deftest python-indent-dedent-line-backspace-1 ()
+  "Check de-indentation on first call.  Bug#18319."
+  (python-tests-with-temp-buffer
+   "
+if True:
+    x ()
+    if False:
+"
+   (python-tests-look-at "if False:")
+   (call-interactively #'python-indent-dedent-line-backspace)
+   (should (zerop (current-indentation)))
+   ;; XXX: This should be a call to `undo' but it's triggering errors.
+   (insert "    ")
+   (should (= (current-indentation) 4))
+   (call-interactively #'python-indent-dedent-line-backspace)
+   (should (zerop (current-indentation)))))
+
 \f
 ;;; Shell integration