mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-26 22:11:12 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
0
test/command_callback/inko_paths/test.inko
Normal file
0
test/command_callback/inko_paths/test.inko
Normal file
@@ -0,0 +1,40 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('erlang', 'erlc')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default command should be correct.):
|
||||
let g:cmd = ale_linters#erlang#erlc#GetCommand(bufnr(''))
|
||||
let g:regex = 'erlc.\+-o.\+%t'
|
||||
let g:matched = match(g:cmd, g:regex)
|
||||
|
||||
" match returns -1 if not found
|
||||
AssertNotEqual
|
||||
\ g:matched,
|
||||
\ -1,
|
||||
\ 'Command error: expected [' . g:cmd . '] to match [' . g:regex . ']'
|
||||
|
||||
Execute(The command should accept configured executable.):
|
||||
let b:ale_erlang_erlc_executable = '/usr/bin/erlc'
|
||||
let g:cmd = ale_linters#erlang#erlc#GetCommand(bufnr(''))
|
||||
let g:regex = '/usr/bin/erlc.\+-o.\+%t'
|
||||
let g:matched = match(g:cmd, g:regex)
|
||||
|
||||
" match returns -1 if not found
|
||||
AssertNotEqual
|
||||
\ g:matched,
|
||||
\ -1,
|
||||
\ 'Command error: expected [' . g:cmd . '] to match [' . g:regex . ']'
|
||||
|
||||
Execute(The command should accept configured options.):
|
||||
let b:ale_erlang_erlc_options = '-I include'
|
||||
let g:cmd = ale_linters#erlang#erlc#GetCommand(bufnr(''))
|
||||
let g:regex = 'erlc.\+-o.\+-I include.\+%t'
|
||||
let g:matched = match(g:cmd, g:regex)
|
||||
|
||||
" match returns -1 if not found
|
||||
AssertNotEqual
|
||||
\ g:matched,
|
||||
\ -1,
|
||||
\ 'Command error: expected [' . g:cmd . '] to match [' . g:regex . ']'
|
||||
@@ -1,5 +1,6 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('javascript', 'fecs')
|
||||
runtime autoload/ale/handlers/fecs.vim
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
20
test/command_callback/test_inko_inko_callbacks.vader
Normal file
20
test/command_callback/test_inko_inko_callbacks.vader
Normal file
@@ -0,0 +1,20 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('inko', 'inko')
|
||||
call ale#test#SetFilename('inko_paths/test.inko')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default executable path should be correct):
|
||||
AssertLinter 'inko', ale#Escape('inko') . ' build --check --format=json %s'
|
||||
|
||||
Execute(The inko callback should include tests/ for test paths):
|
||||
call ale#engine#Cleanup(bufnr(''))
|
||||
noautocmd e! inko_paths/tests/test/test_foo.inko
|
||||
call ale#engine#InitBufferInfo(bufnr(''))
|
||||
|
||||
AssertLinter 'inko',
|
||||
\ ale#Escape('inko')
|
||||
\ . ' build --check --format=json --include '
|
||||
\ . ale#Escape(ale#path#Simplify(g:dir . '/inko_paths/tests/'))
|
||||
\ . ' %s'
|
||||
Reference in New Issue
Block a user