diff options
author | w0rp <w0rp@users.noreply.github.com> | 2020-08-17 21:29:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 21:29:16 +0100 |
commit | eb864730e2bf843f83dcf58ae43c802ad0cad8ee (patch) | |
tree | 2fb99823bad74b288ce3f5868a871490c0d4cb3b /test/test_shell_detection.vader | |
parent | 514e5a8baa539f38c62881673727be6f67935d75 (diff) | |
parent | ece229c06f36efdc172ae6d70c73b72a16bb4cdf (diff) | |
download | ale-eb864730e2bf843f83dcf58ae43c802ad0cad8ee.zip |
Merge pull request #2906 from elebow/shelldetect-fall-back-to-filetype-if-no-hashbang
ShellDetect falls back to filetype if no hashbang (fixes #2886)
Diffstat (limited to 'test/test_shell_detection.vader')
-rw-r--r-- | test/test_shell_detection.vader | 10 |
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 |