diff options
author | Stephen Gildea <stepheng+emacs@gildea.com> | 2018-07-31 22:34:35 -0700 |
---|---|---|
committer | Stephen Gildea <stepheng+emacs@gildea.com> | 2018-07-31 22:34:35 -0700 |
commit | 1804fece02691798394c9e9bd519cd4a53776018 (patch) | |
tree | 9d5d441db29404f04417332be3507ba968eec42f /test/lisp/emacs-lisp/lisp-mode-tests.el | |
parent | 17205d361795eaaa8e09ae62875c7439bb57a078 (diff) | |
parent | 82d6416a28dc5b4ab65b8081f035679bec4e3604 (diff) | |
download | emacs-1804fece02691798394c9e9bd519cd4a53776018.tar.gz |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'test/lisp/emacs-lisp/lisp-mode-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/lisp-mode-tests.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index 8598d419788..30f606d3816 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el @@ -113,6 +113,29 @@ noindent\" 3 ;; we're indenting ends on the previous line. (should (equal (buffer-string) original))))) +(ert-deftest indent-sexp-go () + "Make sure `indent-sexp' doesn't stop after #s." + ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31984. + (with-temp-buffer + (emacs-lisp-mode) + (insert "#s(foo\nbar)\n") + (goto-char (point-min)) + (indent-sexp) + (should (equal (buffer-string) "\ +#s(foo + bar)\n")))) + +(ert-deftest indent-sexp-cant-go () + "`indent-sexp' shouldn't error before a sexp." + ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31984#32. + (with-temp-buffer + (emacs-lisp-mode) + (insert "(())") + (goto-char (1+ (point-min))) + ;; Paredit calls `indent-sexp' from this position. + (indent-sexp) + (should (equal (buffer-string) "(())")))) + (ert-deftest lisp-indent-region () "Test basics of `lisp-indent-region'." (with-temp-buffer |