summaryrefslogtreecommitdiff
path: root/test/test_ant_build_classpath_command.vader
blob: 72a7688d6ed5354f4facd0b4e4343df52ea989f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Before:
  call ale#test#SetDirectory('/testplugin/test')
  runtime ale_linters/java/javac.vim

  Save $PATH
  let $PATH = ale#path#Simplify(g:dir . '/ant-test-files/bin')

After:
  Restore

  call ale#test#RestoreDirectory()
  call ale#linter#Reset()

Execute(Should return `cd '[dir]' && 'ant' classpath -S -q`):
  call ale#test#SetFilename('ant-test-files/ant-project/Main.java')

  AssertEqual
  \ [
  \   ale#path#Simplify(g:dir . '/ant-test-files/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('ant-test-files/not-an-ant-project/Main.java')

  AssertEqual ['', ''], ale#ant#BuildClasspathCommand(bufnr(''))