2019-06-03 19:30:18 +00:00
|
|
|
Before:
|
|
|
|
call ale#test#SetDirectory('/testplugin/test')
|
|
|
|
runtime ale_linters/java/javac.vim
|
|
|
|
|
|
|
|
Save $PATH
|
2021-03-20 22:11:22 +00:00
|
|
|
let $PATH = ale#path#Simplify(g:dir . '/test-files/ant/bin')
|
2019-06-03 19:30:18 +00:00
|
|
|
|
|
|
|
After:
|
|
|
|
Restore
|
|
|
|
|
|
|
|
call ale#test#RestoreDirectory()
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(Should return `cd '[dir]' && 'ant' classpath -S -q`):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/ant/ant-project/Main.java')
|
2019-06-03 19:30:18 +00:00
|
|
|
|
|
|
|
AssertEqual
|
2021-03-01 20:11:10 +00:00
|
|
|
\ [
|
2021-03-20 22:11:22 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/test-files/ant/ant-project'),
|
2021-03-01 20:11:10 +00:00
|
|
|
\ ale#Escape('ant') . ' classpath' . ' -S' . ' -q',
|
|
|
|
\ ],
|
2019-06-03 19:30:18 +00:00
|
|
|
\ ale#ant#BuildClasspathCommand(bufnr(''))
|
2021-03-01 20:11:10 +00:00
|
|
|
|
|
|
|
Execute(Should return empty string if ant cannot be executed):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/ant/not-an-ant-project/Main.java')
|
2021-03-01 20:11:10 +00:00
|
|
|
|
|
|
|
AssertEqual ['', ''], ale#ant#BuildClasspathCommand(bufnr(''))
|