aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina2014-12-27 13:21:17 -0300
committerFabián Ezequiel Gallina2014-12-27 13:21:17 -0300
commit411c1c65313aa4e22730ba9762e073881f4e299a (patch)
tree14833e398a5ce64db5124afafe992d47e51b70e8 /test
parentc3c51ec274f423cf8044cd5b9bc0bbc5bda1f6aa (diff)
parent216c6aadf22bfb9d209b6ce9a469499fd6e1b78f (diff)
downloademacs-411c1c65313aa4e22730ba9762e073881f4e299a.tar.gz
emacs-411c1c65313aa4e22730ba9762e073881f4e299a.zip
Merge from origin/emacs-24
216c6aa * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use `tramp-rsh-end-of-line', it ought to be more robust. 20cfd24 Improve indexing on the chapter/section/subsection levels. 14c3739 * lisp/progmodes/js.el (js-syntax-propertize): "return" can't be divided. ea78112 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n" as end-of-line delimeter for passwords, when running on MS Windows. 012479a * lisp/progmodes/sh-script.el: Don't set global indent-line-function 75e114f Fix line numbers on Python shell. d0fd23c doc/emacs/buffers.texi (Kill Buffer): Improve indexing. 8e818d1 Keep maximized when going fullscreen. 749813e python.el: Fix electric colon behavior 936d5e5 Fix last patch. 74d3b20 Fixes: debbugs:18623 Conflicts: doc/emacs/ChangeLog doc/lispref/ChangeLog doc/lispref/functions.texi lisp/ChangeLog src/ChangeLog src/xterm.c test/ChangeLog
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog6
-rw-r--r--test/automated/python-tests.el33
2 files changed, 39 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 4e59ee0afbf..e7b8fec0ec9 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
12014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
2
3 * automated/python-tests.el (python-indent-electric-colon-2)
4 (python-indent-electric-colon-3): New tests.
5
62014-12-27 João Távora <joaotavora@gmail.com>
12014-12-27 João Távora <joaotavora@gmail.com> 72014-12-27 João Távora <joaotavora@gmail.com>
2 8
3 * automated/electric-tests.el (autowrapping-7): Tests for 9 * automated/electric-tests.el (autowrapping-7): Tests for
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el
index fd427941bf1..ab0ab2d54d7 100644
--- a/test/automated/python-tests.el
+++ b/test/automated/python-tests.el
@@ -740,6 +740,39 @@ def b()
740 (python-tests-self-insert ":") 740 (python-tests-self-insert ":")
741 (should (= (current-indentation) 0)))) 741 (should (= (current-indentation) 0))))
742 742
743(ert-deftest python-indent-electric-colon-2 ()
744 "Test indentation case for dedenter."
745 (python-tests-with-temp-buffer
746 "
747if do:
748 something()
749 else
750"
751 (python-tests-look-at "else")
752 (goto-char (line-end-position))
753 (python-tests-self-insert ":")
754 (should (= (current-indentation) 0))))
755
756(ert-deftest python-indent-electric-colon-3 ()
757 "Test indentation case for multi-line dedenter."
758 (python-tests-with-temp-buffer
759 "
760if do:
761 something()
762 elif (this
763 and
764 that)
765"
766 (python-tests-look-at "that)")
767 (goto-char (line-end-position))
768 (python-tests-self-insert ":")
769 (python-tests-look-at "elif" -1)
770 (should (= (current-indentation) 0))
771 (python-tests-look-at "and")
772 (should (= (current-indentation) 6))
773 (python-tests-look-at "that)")
774 (should (= (current-indentation) 6))))
775
743(ert-deftest python-indent-region-1 () 776(ert-deftest python-indent-region-1 ()
744 "Test indentation case from Bug#18843." 777 "Test indentation case from Bug#18843."
745 (let ((contents " 778 (let ((contents "