From 7d7e8a9c15cd509e731686f8e63fc1d574f4b5c0 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 2 Sep 2021 08:43:48 +0200 Subject: [PATCH] Add a test for bug#50320 in sh-script --- test/lisp/progmodes/sh-script-tests.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/lisp/progmodes/sh-script-tests.el b/test/lisp/progmodes/sh-script-tests.el index 5bdce6260ae..c21010c8b43 100644 --- a/test/lisp/progmodes/sh-script-tests.el +++ b/test/lisp/progmodes/sh-script-tests.el @@ -37,4 +37,15 @@ "relative-path/to/configure --prefix=$prefix\\ --with-x")))) +(ert-deftest test-basic-sh-indentation () + (with-temp-buffer + (insert "myecho () {\necho foo\n}\n") + (shell-script-mode) + (indent-region (point-min) (point-max)) + (should (equal (buffer-string) + "myecho () { + echo foo +} +")))) + ;;; sh-script-tests.el ends here -- 2.39.2