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_iverilog_command_callback.vader | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'test/command_callback/test_iverilog_command_callback.vader') diff --git a/test/command_callback/test_iverilog_command_callback.vader b/test/command_callback/test_iverilog_command_callback.vader index 2c633178..d7a29f05 100644 --- a/test/command_callback/test_iverilog_command_callback.vader +++ b/test/command_callback/test_iverilog_command_callback.vader @@ -1,24 +1,14 @@ Before: - Save g:ale_verilog_iverilog_options - - unlet! g:ale_verilog_iverilog_options - - runtime ale_linters/verilog/iverilog.vim + call ale#assert#SetUpLinterTest('verilog', 'iverilog') After: - Restore - - call ale#linter#Reset() + call ale#assert#TearDownLinterTest() Execute(The default iverilog command should be correct): - AssertEqual - \ 'iverilog -t null -Wall %t', - \ ale_linters#verilog#iverilog#GetCommand(bufnr('')) + AssertLinter 'iverilog', 'iverilog -t null -Wall %t' Execute(iverilog options should be configurable): " Additional args for the linter let g:ale_verilog_iverilog_options = '-y.' - AssertEqual - \ 'iverilog -t null -Wall -y. %t', - \ ale_linters#verilog#iverilog#GetCommand(bufnr('')) + AssertLinter 'iverilog', 'iverilog -t null -Wall -y. %t' -- cgit v1.2.3