diff options
author | w0rp <devw0rp@gmail.com> | 2017-08-19 15:48:29 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-08-19 15:48:29 +0100 |
commit | 20e64fbae092e7307c4f01d82fa0e0082c3bb1cb (patch) | |
tree | 386644e3d48afbd9b8af8e8de4c100cb93df02e6 /test | |
parent | f8de08faf0c23ac4b76e610f685dcf6c3dfdf180 (diff) | |
download | ale-20e64fbae092e7307c4f01d82fa0e0082c3bb1cb.zip |
#860 Only enable the new option for setting the original filename for SyntaxErl if an option is on in ALE
Diffstat (limited to 'test')
-rw-r--r-- | test/command_callback/test_erlang_syntaxerl_command_callback.vader | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/test/command_callback/test_erlang_syntaxerl_command_callback.vader b/test/command_callback/test_erlang_syntaxerl_command_callback.vader index 800aaf3f..130becf6 100644 --- a/test/command_callback/test_erlang_syntaxerl_command_callback.vader +++ b/test/command_callback/test_erlang_syntaxerl_command_callback.vader @@ -1,13 +1,20 @@ Before: Save g:ale_erlang_syntaxerl_executable - unlet! g:ale_erlang_syntaxerl_executable b:ale_erlang_syntaxerl_executable + Save g:ale_erlang_syntaxerl_use_basename + + unlet! g:ale_erlang_syntaxerl_executable + unlet! b:ale_erlang_syntaxerl_executable + unlet! b:ale_erlang_syntaxerl_use_basename + runtime ale_linters/erlang/syntaxerl.vim After: + Restore + call ale#linter#Reset() - Restore g:ale_erlang_syntaxerl_executable -Execute (Get SyntaxErl executable): + +Execute (The SyntaxErl executable should be correct): AssertEqual 'syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr('')) let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl' @@ -16,11 +23,17 @@ Execute (Get SyntaxErl executable): let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl' AssertEqual '/yet/another/syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr('')) -Execute (Get SyntaxErl command line): - AssertEqual 'syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) +Execute (The default SyntaxErl command should be correct): + AssertEqual 'syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) +Execute (The executable name should be used in the command): let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl' - AssertEqual '/some/other/syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) + AssertEqual '/some/other/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl' - AssertEqual '/yet/another/syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) + AssertEqual '/yet/another/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) + +Execute (The basename option should be set when the option is on): + let b:ale_erlang_syntaxerl_use_basename = 1 + + AssertEqual 'syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) |