mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 05:04:28 +08:00
Massively reduce the amount of code needed for linter tests
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user