diff options
Diffstat (limited to 'test/command_callback/test_idris_command_callbacks.vader')
-rw-r--r-- | test/command_callback/test_idris_command_callbacks.vader | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/test/command_callback/test_idris_command_callbacks.vader b/test/command_callback/test_idris_command_callbacks.vader index 03a69f39..ce7cd270 100644 --- a/test/command_callback/test_idris_command_callbacks.vader +++ b/test/command_callback/test_idris_command_callbacks.vader @@ -1,42 +1,21 @@ Before: - Save g:ale_idris_idris_executable - Save g:ale_idris_idris_options - - unlet! g:ale_idris_idris_executable - unlet! b:ale_idris_idris_executable - unlet! g:ale_idris_idris_options - unlet! b:ale_idris_idris_options - - runtime ale_linters/idris/idris.vim + call ale#assert#SetUpLinterTest('idris', 'idris') After: - Restore unlet! b:command_tail - unlet! b:ale_idris_idris_executable - unlet! b:ale_idris_idris_options - call ale#linter#Reset() - -Execute(The executable should be configurable): - AssertEqual 'idris', ale_linters#idris#idris#GetExecutable(bufnr('')) - - let b:ale_idris_idris_executable = 'foobar' - AssertEqual 'foobar', ale_linters#idris#idris#GetExecutable(bufnr('')) + call ale#assert#TearDownLinterTest() Execute(The executable should be used in the command): - AssertEqual - \ ale#Escape('idris') . ' --total --warnpartial --warnreach --warnipkg --check %s', - \ ale_linters#idris#idris#GetCommand(bufnr('')) + AssertLinter 'idris', + \ ale#Escape('idris') . ' --total --warnpartial --warnreach --warnipkg --check %s' let b:ale_idris_idris_executable = 'foobar' - AssertEqual - \ ale#Escape('foobar') . ' --total --warnpartial --warnreach --warnipkg --check %s', - \ ale_linters#idris#idris#GetCommand(bufnr('')) + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' --total --warnpartial --warnreach --warnipkg --check %s' Execute(The options should be configurable): let b:ale_idris_idris_options = '--something' - AssertEqual - \ ale#Escape('idris') . ' --something --check %s', - \ ale_linters#idris#idris#GetCommand(bufnr('')) + AssertLinter 'idris', ale#Escape('idris') . ' --something --check %s' |