From a42999a639b2916b769a85f37d037be314d9d61b Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 15 Jul 2018 18:24:53 +0100 Subject: Massively reduce the amount of code needed for linter tests --- .../test_jscs_command_callback.vader | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'test/command_callback/test_jscs_command_callback.vader') diff --git a/test/command_callback/test_jscs_command_callback.vader b/test/command_callback/test_jscs_command_callback.vader index f118c039..7cdf5467 100644 --- a/test/command_callback/test_jscs_command_callback.vader +++ b/test/command_callback/test_jscs_command_callback.vader @@ -1,25 +1,15 @@ Before: - runtime ale_linters/javascript/jscs.vim + call ale#assert#SetUpLinterTest('javascript', 'jscs') After: - call ale#linter#Reset() - let g:ale_javascript_jscs_executable = 'jscs' + call ale#assert#TearDownLinterTest() Execute(Should return the correct default values): - AssertEqual - \ 'jscs', - \ ale_linters#javascript#jscs#GetExecutable(bufnr('')) - AssertEqual - \ ale#Escape('jscs') . ' --reporter inline --no-colors -', - \ ale_linters#javascript#jscs#GetCommand(bufnr('')) - + AssertLinter 'jscs', + \ ale#Escape('jscs') . ' --reporter inline --no-colors -' Execute(Should allow using a custom executable): let g:ale_javascript_jscs_executable = 'foobar' - AssertEqual - \ 'foobar', - \ ale_linters#javascript#jscs#GetExecutable(bufnr('')) - AssertEqual - \ ale#Escape('foobar') . ' --reporter inline --no-colors -', - \ ale_linters#javascript#jscs#GetCommand(bufnr('')) + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' --reporter inline --no-colors -' -- cgit v1.2.3