emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master caadbd9 2/3: ; Add test for previous change


From: Noam Postavsky
Subject: [Emacs-diffs] master caadbd9 2/3: ; Add test for previous change
Date: Sun, 28 Apr 2019 16:46:25 -0400 (EDT)

branch: master
commit caadbd94921b66fd6820dbc95783765837b931f7
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    ; Add test for previous change
    
    * test/lisp/progmodes/python-tests.el (python-indent-hanging-close-paren):
    New test.
---
 test/lisp/progmodes/python-tests.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/lisp/progmodes/python-tests.el 
b/test/lisp/progmodes/python-tests.el
index b940f45..a517909 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]