summaryrefslogtreecommitdiff
path: root/test/test_shell_detection.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_shell_detection.vader')
-rw-r--r--test/test_shell_detection.vader10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_shell_detection.vader b/test/test_shell_detection.vader
index 6452287f..697054d0 100644
--- a/test/test_shell_detection.vader
+++ b/test/test_shell_detection.vader
@@ -98,6 +98,16 @@ Execute(The ksh dialect should be used for shellcheck if b:is_kornshell is 1):
AssertEqual 'ksh', ale#handlers#shellcheck#GetDialectArgument(bufnr(''))
+Execute(The filetype should be used as the default shell type when there is no hashbang line):
+ set filetype=zsh
+ AssertEqual 'zsh', ale#handlers#sh#GetShellType(bufnr(''))
+
+ set filetype=tcsh
+ AssertEqual 'tcsh', ale#handlers#sh#GetShellType(bufnr(''))
+
+ set filetype=python
+ AssertEqual '', ale#handlers#sh#GetShellType(bufnr(''))
+
Given(A file with /bin/ash):
#!/bin/ash