summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-05 21:31:41 +0000
committerw0rp <devw0rp@gmail.com>2017-11-05 21:31:41 +0000
commit3c8e6ed51c4dcae759231d3bd8baff18da30e120 (patch)
treee6c006c740e700ceb491fac1862d5250bb1b570e /test
parent716b22d524b80941eee6538e988a963f923901f3 (diff)
downloadale-3c8e6ed51c4dcae759231d3bd8baff18da30e120.zip
Modify the shmft tests so they won't mess with your settings
Diffstat (limited to 'test')
-rw-r--r--test/fixers/test_shfmt_fixer_callback.vader12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/fixers/test_shfmt_fixer_callback.vader b/test/fixers/test_shfmt_fixer_callback.vader
index dcdf66b4..5dc6e863 100644
--- a/test/fixers/test_shfmt_fixer_callback.vader
+++ b/test/fixers/test_shfmt_fixer_callback.vader
@@ -2,23 +2,23 @@ Before:
Save g:ale_sh_shfmt_executable
Save g:ale_sh_shfmt_options
- " Use an invalid global executable, so we don't match it.
- let g:ale_sh_shfmt_executable = 'xxxinvalid'
- let g:ale_sh_shfmt_options = ''
+After:
+ Restore
Execute(The shfmt callback should return the correct default values):
AssertEqual
\ {
- \ 'command': ale#Escape('xxxinvalid'),
+ \ 'command': ale#Escape('shfmt'),
\ },
\ ale#fixers#shfmt#Fix(bufnr(''))
-Execute(The shfmt callback should include custom shfmt options):
+Execute(The shfmt executable and options should be configurable):
+ let g:ale_sh_shfmt_executable = 'foobar'
let g:ale_sh_shfmt_options = '--some-option'
AssertEqual
\ {
- \ 'command': ale#Escape(g:ale_sh_shfmt_executable)
+ \ 'command': ale#Escape('foobar')
\ . ' --some-option',
\ },
\ ale#fixers#shfmt#Fix(bufnr(''))