diff options
author | Alan Mackenzie <acm@muc.de> | 2017-02-12 10:59:03 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2017-02-12 10:59:03 +0000 |
commit | f4d5b687150810129b7a1d5b006e31ccf82b691b (patch) | |
tree | 4229b13800349032697daae3904dc3773e6b7a80 /test/lisp/progmodes | |
parent | d5514332d4a6092673ce1f78fadcae0c57f7be64 (diff) | |
parent | 148100d98319499f0ac6f57b8be08cbd14884a5c (diff) | |
download | emacs-comment-cache.tar.gz |
Merge branch 'master' into comment-cachecomment-cache
Diffstat (limited to 'test/lisp/progmodes')
-rw-r--r-- | test/lisp/progmodes/js-tests.el | 14 | ||||
-rw-r--r-- | test/lisp/progmodes/python-tests.el | 23 |
2 files changed, 36 insertions, 1 deletions
diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el index 84749efa45b..7cb737c30e2 100644 --- a/test/lisp/progmodes/js-tests.el +++ b/test/lisp/progmodes/js-tests.el @@ -85,6 +85,20 @@ if (!/[ (:,='\"]/.test(value)) { (should (= (current-column) x)) (forward-line)))) +(ert-deftest js-mode-auto-fill () + (with-temp-buffer + (js-mode) + (setq fill-column 70) + (insert "/* ") + (dotimes (_ 16) + (insert "test ")) + (do-auto-fill) + ;; The bug is that, after auto-fill, the second line starts with + ;; "/*", whereas it should start with " * ". + (goto-char (point-min)) + (forward-line) + (should (looking-at " \\* test")))) + (provide 'js-tests) ;;; js-tests.el ends here diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 2df1bbf50d8..1e6b867d30b 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -1156,6 +1156,27 @@ if do: (python-tests-look-at "that)") (should (= (current-indentation) 6)))) +(ert-deftest python-indent-electric-colon-4 () + "Test indentation case where there is one more-indented previous open block." + (python-tests-with-temp-buffer + " +def f(): + if True: + a = 5 + + if True: + a = 10 + + b = 3 + +else +" + (python-tests-look-at "else") + (goto-char (line-end-position)) + (python-tests-self-insert ":") + (python-tests-look-at "else" -1) + (should (= (current-indentation) 4)))) + (ert-deftest python-indent-region-1 () "Test indentation case from Bug#18843." (let ((contents " @@ -2457,7 +2478,7 @@ if x: (python-tests-with-temp-buffer " \"\n" (goto-char (point-min)) - (font-lock-fontify-buffer))) + (call-interactively 'font-lock-fontify-buffer))) ;;; Shell integration |