]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add test for previous change
authorNoam Postavsky <npostavs@gmail.com>
Sat, 20 Apr 2019 19:31:51 +0000 (15:31 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 28 Apr 2019 20:45:13 +0000 (16:45 -0400)
* test/lisp/progmodes/python-tests.el (python-indent-hanging-close-paren):
New test.

test/lisp/progmodes/python-tests.el

index b940f45bb90f309683c43c01fb519c2dfe9baab1..a51790971725d1a55d22d7257e9702e914ee48b5 100644 (file)
@@ -260,6 +260,19 @@ foo = long_function_name(
    (should (eq (car (python-indent-context)) :inside-paren-newline-start))
    (should (= (python-indent-calculate-indentation) 4))))
 
+(ert-deftest python-indent-hanging-close-paren ()
+  "Like first pep8 case, but with hanging close paren." ;; See Bug#20742.
+  (python-tests-with-temp-buffer
+   "\
+foo = long_function_name(var_one, var_two,
+                         var_three, var_four
+                         )
+"
+   (should (= (python-indent-calculate-indentation) 0))
+   (python-tests-look-at ")")
+   (should (eq (car (python-indent-context)) :inside-paren-at-closing-paren))
+   (should (= (python-indent-calculate-indentation) 25))))
+
 (ert-deftest python-indent-base-case ()
   "Check base case does not trigger errors."
   (python-tests-with-temp-buffer