summaryrefslogtreecommitdiff
path: root/test/test_shell_detection.vader
diff options
context:
space:
mode:
authorAndrew Imeson <andrew.imeson@covenanteyes.com>2019-01-24 13:49:16 -0500
committerAndrew Imeson <andrew.imeson@covenanteyes.com>2019-01-24 14:14:49 -0500
commita6de3f37274d4db9774136350d6475397dc7ac21 (patch)
tree33fd4b74371c64879731426eab6d0e538c47ebf2 /test/test_shell_detection.vader
parenteec8b9da60092bd9f88a8b56bee698e251dfc2de (diff)
downloadale-a6de3f37274d4db9774136350d6475397dc7ac21.zip
Add better detection for KornShell/ksh
Diffstat (limited to 'test/test_shell_detection.vader')
-rw-r--r--test/test_shell_detection.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_shell_detection.vader b/test/test_shell_detection.vader
index 1b0a20e3..88ee462d 100644
--- a/test/test_shell_detection.vader
+++ b/test/test_shell_detection.vader
@@ -57,6 +57,22 @@ Execute(csh should be detected appropriately):
AssertEqual 'csh', ale_linters#sh#shell#GetExecutable(bufnr(''))
AssertEqual 'csh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
+Given(A file with a ksh hashbang):
+ #!/bin/ksh
+
+Execute(/bin/ksh should be detected appropriately):
+ AssertEqual 'ksh', ale#handlers#sh#GetShellType(bufnr(''))
+ AssertEqual 'ksh', ale_linters#sh#shell#GetExecutable(bufnr(''))
+ AssertEqual 'ksh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
+
+Given(A file with a ksh as an argument to env):
+ #!/usr/bin/env ksh
+
+Execute(ksh should be detected appropriately):
+ AssertEqual 'ksh', ale#handlers#sh#GetShellType(bufnr(''))
+ AssertEqual 'ksh', ale_linters#sh#shell#GetExecutable(bufnr(''))
+ AssertEqual 'ksh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
+
Given(A file with a sh hash bang and arguments):
#!/usr/bin/env sh -eu --foobar