diff options
author | w0rp <devw0rp@gmail.com> | 2017-10-23 01:26:31 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-10-23 01:26:31 +0100 |
commit | 231398dddc59b01bc83f5a333af1ae741d31ed51 (patch) | |
tree | 1e5dab4cca104a01d11c7428e3c802296cb3bf31 /test/test_gradle_find_executable.vader | |
parent | c4579e1809d2ca40f917a4ccd665693ba0a33dcb (diff) | |
download | ale-231398dddc59b01bc83f5a333af1ae741d31ed51.zip |
Get more of the tests to pass on Windows
Diffstat (limited to 'test/test_gradle_find_executable.vader')
-rw-r--r-- | test/test_gradle_find_executable.vader | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/test/test_gradle_find_executable.vader b/test/test_gradle_find_executable.vader index 2ae2b464..054c21a8 100644 --- a/test/test_gradle_find_executable.vader +++ b/test/test_gradle_find_executable.vader @@ -1,31 +1,37 @@ Before: + Save $PATH + Save $PATHEXT + + " Count the gradle executable without .exe as executable on Windows + let $PATHEXT = '.' + call ale#test#SetDirectory('/testplugin/test') runtime ale_linters/kotlin/kotlinc.vim - let g:ale_gradle_path = $PATH After: + Restore + call ale#test#RestoreDirectory() call ale#linter#Reset() - let $PATH = g:ale_gradle_path - + Execute(Should return 'gradlew' if found in parent directory): call ale#test#SetFilename('gradle-test-files/wrapped-project/src/main/kotlin/dummy.kt') AssertEqual - \ g:dir . '/gradle-test-files/wrapped-project/gradlew', + \ ale#path#Winify(g:dir . '/gradle-test-files/wrapped-project/gradlew'), \ ale#gradle#FindExecutable(bufnr('')) Execute(Should return 'gradle' if 'gradlew' not found in parent directory): call ale#test#SetFilename('gradle-test-files/unwrapped-project/src/main/kotlin/dummy.kt') - let $PATH .= ':' . g:dir . '/gradle-test-files' - + let $PATH .= (has('win32') ? ';': ':') . ale#path#Winify(g:dir . '/gradle-test-files') + AssertEqual - \ 'gradle', + \ 'gradle', \ ale#gradle#FindExecutable(bufnr('')) Execute(Should return empty string if 'gradlew' not in parent directory and gradle not in path): call ale#test#SetFilename('gradle-test-files/unwrapped-project/src/main/kotlin/dummy.kt') - + AssertEqual - \ '', + \ '', \ ale#gradle#FindExecutable(bufnr('')) |