2019-12-16 00:18:13 +00:00
|
|
|
Before:
|
|
|
|
call ale#test#SetDirectory('/testplugin/test')
|
|
|
|
runtime ale_linters/kotlin/javac.vim
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#test#RestoreDirectory()
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(Should return directory for 'mvnw' if found in parent directory):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/maven/maven-java-project/module1/src/main/java/dummy1.java')
|
2019-12-16 00:18:13 +00:00
|
|
|
|
|
|
|
AssertEqual
|
2021-03-20 22:11:22 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/test-files/maven/maven-java-project/module1'),
|
2019-12-16 00:18:13 +00:00
|
|
|
\ ale#maven#FindProjectRoot(bufnr(''))
|
|
|
|
|
|
|
|
Execute(Should return directory for 'pom.xml' if found in parent directory):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/maven/maven-java-project/module2/src/main/java/dummy2.java')
|
2019-12-16 00:18:13 +00:00
|
|
|
|
|
|
|
AssertEqual
|
2021-03-20 22:11:22 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/test-files/maven/maven-java-project/module2'),
|
2019-12-16 00:18:13 +00:00
|
|
|
\ ale#maven#FindProjectRoot(bufnr(''))
|
|
|
|
|
|
|
|
Execute(Should return empty string if maven files are not found in parent directory):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('test-files/maven/non-maven-project/src/main/java/dummy.java')
|
2019-12-16 00:18:13 +00:00
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ '',
|
|
|
|
\ ale#maven#FindProjectRoot(bufnr(''))
|