aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/emacs-lisp/lisp-mode-tests.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el
index 1f78eb30105..f2fe7a6cf41 100644
--- a/test/lisp/emacs-lisp/lisp-mode-tests.el
+++ b/test/lisp/emacs-lisp/lisp-mode-tests.el
@@ -99,6 +99,20 @@ noindent\" 3
99 (indent-sexp) 99 (indent-sexp)
100 (should (equal (buffer-string) correct))))) 100 (should (equal (buffer-string) correct)))))
101 101
102(ert-deftest indent-sexp-stop ()
103 "Make sure `indent-sexp' stops at the end of the sexp."
104 ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26878.
105 (with-temp-buffer
106 (emacs-lisp-mode)
107 (insert "(a ()\n)")
108 (let ((original (buffer-string)))
109 (search-backward "a ")
110 (goto-char (match-end 0))
111 (indent-sexp)
112 ;; The final paren should not be indented, because the sexp
113 ;; we're indenting ends on the previous line.
114 (should (equal (buffer-string) original)))))
115
102(ert-deftest lisp-indent-region () 116(ert-deftest lisp-indent-region ()
103 "Test basics of `lisp-indent-region'." 117 "Test basics of `lisp-indent-region'."
104 (with-temp-buffer 118 (with-temp-buffer