]> git.eshelyaron.com Git - emacs.git/commitdiff
Add a test for bug#50320 in sh-script
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 2 Sep 2021 06:43:48 +0000 (08:43 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 2 Sep 2021 06:43:48 +0000 (08:43 +0200)
test/lisp/progmodes/sh-script-tests.el

index 5bdce6260ae3883d447b36c4ff0c5afc1a3cbfc0..c21010c8b438c391f1f6f067b09b81abf9ba9fca 100644 (file)
              "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