Make sh-script-tests.el more robust
* test/lisp/progmodes/sh-script-tests.el (test-sh-script-indentation) (test-basic-sh-indentation, test-indent-after-continuation): * test/lisp/progmodes/sh-script-resources/sh-indents.erts (Code): Skip if `sh-indent-supported-here' is nil. (Bug#70196)
This commit is contained in:
parent
4e22ad8cef
commit
aa356d03ae
2 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,10 @@
|
|||
Code:
|
||||
(lambda ()
|
||||
(shell-script-mode)
|
||||
(unless sh-indent-supported-here
|
||||
(ert-skip
|
||||
'((skip-unless sh-indent-supported-here)
|
||||
:form sh-indent-supported-here :value nil)))
|
||||
(indent-region (point-min) (point-max)))
|
||||
|
||||
Name: sh-indents1
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
(insert "relative-path/to/configure --prefix=$prefix\\
|
||||
--with-x")
|
||||
(shell-script-mode)
|
||||
(skip-unless sh-indent-supported-here)
|
||||
(goto-char (point-min))
|
||||
(forward-line 1)
|
||||
(indent-for-tab-command)
|
||||
|
@ -42,6 +43,7 @@
|
|||
(with-temp-buffer
|
||||
(insert "myecho () {\necho foo\n}\n")
|
||||
(shell-script-mode)
|
||||
(skip-unless sh-indent-supported-here)
|
||||
(indent-region (point-min) (point-max))
|
||||
(should (equal (buffer-string)
|
||||
"myecho () {
|
||||
|
@ -56,6 +58,7 @@
|
|||
(with-temp-buffer
|
||||
(insert "for f \\\nin a; do \\\ntoto; \\\ndone\n")
|
||||
(shell-script-mode)
|
||||
(skip-unless sh-indent-supported-here)
|
||||
(let ((sh-indent-for-continuation '++))
|
||||
(let ((sh-indent-after-continuation t))
|
||||
(indent-region (point-min) (point-max))
|
||||
|
|
Loading…
Add table
Reference in a new issue