You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
7 years ago
|
Before:
|
||
|
call ale#test#SetDirectory('/testplugin/test')
|
||
|
runtime ale_linters/kotlin/kotlinc.vim
|
||
|
|
||
|
After:
|
||
|
call ale#test#RestoreDirectory()
|
||
|
call ale#linter#Reset()
|
||
|
|
||
|
Execute(Should return directory for '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',
|
||
|
\ ale#gradle#FindProjectRoot(bufnr(''))
|
||
|
|
||
|
Execute(Should return directory for 'settings.gradle' if found in parent directory):
|
||
|
call ale#test#SetFilename('gradle-test-files/settings-gradle-project/src/main/kotlin/dummy.kt')
|
||
|
|
||
|
AssertEqual
|
||
|
\ g:dir . '/gradle-test-files/settings-gradle-project',
|
||
|
\ ale#gradle#FindProjectRoot(bufnr(''))
|
||
|
|
||
|
Execute(Should return directory for 'build.gradle' if found in parent directory):
|
||
|
call ale#test#SetFilename('gradle-test-files/build-gradle-project/src/main/kotlin/dummy.kt')
|
||
|
|
||
|
AssertEqual
|
||
|
\ g:dir . '/gradle-test-files/build-gradle-project',
|
||
|
\ ale#gradle#FindProjectRoot(bufnr(''))
|
||
|
|
||
|
Execute(Should return empty string if gradle files are not found in parent directory):
|
||
|
call ale#test#SetFilename('gradle-test-files/non-gradle-project/src/main/kotlin/dummy.kt')
|
||
|
|
||
|
AssertEqual
|
||
|
\ '',
|
||
|
\ ale#gradle#FindProjectRoot(bufnr(''))
|