From: Noam Postavsky Date: Sat, 20 Apr 2019 19:31:51 +0000 (-0400) Subject: ; Add test for previous change X-Git-Tag: emacs-27.0.90~3051 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=caadbd94921b66fd6820dbc95783765837b931f7;p=emacs.git ; Add test for previous change * test/lisp/progmodes/python-tests.el (python-indent-hanging-close-paren): New test. --- diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index b940f45bb90..a5179097172 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -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