]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/test_gradle_find_executable.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '76265755a1add77121c8f9dabb3e9bb70fe9a972' as '.vim/bundle/ale'
[etc/vim.git] / .vim / bundle / ale / test / test_gradle_find_executable.vader
1 Before:
2   Save $PATH
3   Save $PATHEXT
4
5   " Count the gradle executable without .exe as executable on Windows
6   let $PATHEXT = '.'
7
8   call ale#test#SetDirectory('/testplugin/test')
9   runtime ale_linters/kotlin/kotlinc.vim
10
11 After:
12   Restore
13
14   call ale#test#RestoreDirectory()
15   call ale#linter#Reset()
16
17 Execute(Should return 'gradlew' if found in parent directory):
18   call ale#test#SetFilename('test-files/gradle/wrapped-project/src/main/kotlin/dummy.kt')
19
20   AssertEqual
21   \ ale#path#Simplify(g:dir . '/test-files/gradle/wrapped-project/gradlew'),
22   \ ale#gradle#FindExecutable(bufnr(''))
23
24 Execute(Should return 'gradle' if 'gradlew' not found in parent directory):
25   call ale#test#SetFilename('test-files/gradle/unwrapped-project/src/main/kotlin/dummy.kt')
26   let $PATH .= (has('win32') ? ';': ':') . ale#path#Simplify(g:dir . '/test-files/gradle')
27
28   AssertEqual
29   \ 'gradle',
30   \ ale#gradle#FindExecutable(bufnr(''))
31
32 Execute(Should return empty string if 'gradlew' not in parent directory and gradle not in path):
33   call ale#test#SetFilename('test-files/gradle/unwrapped-project/src/main/kotlin/dummy.kt')
34
35   AssertEqual
36   \ '',
37   \ ale#gradle#FindExecutable(bufnr(''))