diff options
author | Bartek thindil Jasicki <thindil@laeran.pl> | 2020-09-11 10:38:36 +0200 |
---|---|---|
committer | Bartek thindil Jasicki <thindil@laeran.pl> | 2020-09-11 10:38:36 +0200 |
commit | 1781b1eab0f9c8e6dd5beca302bd9cd430d7f7b2 (patch) | |
tree | 877345d38bc61e2b492e5f04336f1cdb564d7c7e /test/command_callback/test_vint_command_callback.vader | |
parent | c78be861035765d268a5533cf583803e22d56d1c (diff) | |
parent | 08295ce17405cb5f6c80d2f726262493bfd21210 (diff) | |
download | ale-1781b1eab0f9c8e6dd5beca302bd9cd430d7f7b2.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/command_callback/test_vint_command_callback.vader')
-rw-r--r-- | test/command_callback/test_vint_command_callback.vader | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/test/command_callback/test_vint_command_callback.vader b/test/command_callback/test_vint_command_callback.vader index 4ce277e8..4a224d01 100644 --- a/test/command_callback/test_vint_command_callback.vader +++ b/test/command_callback/test_vint_command_callback.vader @@ -1,17 +1,17 @@ Before: call ale#assert#SetUpLinterTest('vim', 'vint') - let b:command_tail = (has('nvim') ? ' --enable-neovim' : '') - \ . ' -f "{file_path}:{line_number}:{column_number}: {severity}: {policy_name} - {description} (see {reference})" %t' + let b:common_flags = (has('nvim') ? ' --enable-neovim' : '') + \ . ' -f "{file_path}:{line_number}:{column_number}: {severity}: {policy_name} - {description} (see {reference})"' After: - unlet! b:bin_dir - unlet! b:executable + unlet! b:common_flags + call ale#assert#TearDownLinterTest() Execute(The default command should be correct): AssertLinter 'vint', [ \ ale#Escape('vint') .' --version', - \ ale#Escape('vint') .' -s --no-color' . b:command_tail, + \ ale#Escape('vint') .' -s --no-color' . b:common_flags . ' %t', \] Execute(The executable should be configurable): @@ -19,5 +19,16 @@ Execute(The executable should be configurable): AssertLinter 'foobar', [ \ ale#Escape('foobar') .' --version', - \ ale#Escape('foobar') .' -s --no-color' . b:command_tail, + \ ale#Escape('foobar') .' -s --no-color' . b:common_flags . ' %t', \] + +Execute(The --no-color flag should not be used for older Vint versions): + GivenCommandOutput ['v0.3.5'] + + AssertLinter 'vint', ale#Escape('vint') .' -s' . b:common_flags . ' %t' + +Execute(--stdin-display-name should be used in newer versions): + GivenCommandOutput ['v0.4.0'] + + AssertLinter 'vint', ale#Escape('vint') .' -s --no-color' . b:common_flags + \ . ' --stdin-display-name %s -' |