X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/test_ant_build_classpath_command.vader diff --git a/.vim/bundle/ale/test/test_ant_build_classpath_command.vader b/.vim/bundle/ale/test/test_ant_build_classpath_command.vader new file mode 100644 index 00000000..b97dc594 --- /dev/null +++ b/.vim/bundle/ale/test/test_ant_build_classpath_command.vader @@ -0,0 +1,27 @@ +Before: + call ale#test#SetDirectory('/testplugin/test') + runtime ale_linters/java/javac.vim + + Save $PATH + let $PATH = ale#path#Simplify(g:dir . '/test-files/ant/bin') + +After: + Restore + + call ale#test#RestoreDirectory() + call ale#linter#Reset() + +Execute(Should return `cd '[dir]' && 'ant' classpath -S -q`): + call ale#test#SetFilename('test-files/ant/ant-project/Main.java') + + AssertEqual + \ [ + \ ale#path#Simplify(g:dir . '/test-files/ant/ant-project'), + \ ale#Escape('ant') . ' classpath' . ' -S' . ' -q', + \ ], + \ ale#ant#BuildClasspathCommand(bufnr('')) + +Execute(Should return empty string if ant cannot be executed): + call ale#test#SetFilename('test-files/ant/not-an-ant-project/Main.java') + + AssertEqual ['', ''], ale#ant#BuildClasspathCommand(bufnr(''))