This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/test_kotlin_languageserver_path_detection.vader
MTDL9 5df735555c Add kotlin language server support (#1725)
* Add kotlin languageserver linter definition
* Added kotlin languageserver references in docs, fix missing !! on other linters
* Added Vader tests for root path detection in Kotlin Language Server
2018-07-15 18:54:18 +01:00

25 lines
1 KiB
Text

Before:
call ale#test#SetDirectory('/testplugin/test')
runtime ale_linters/kotlin/languageserver.vim
After:
call ale#test#RestoreDirectory()
call ale#linter#Reset()
Execute(Detect root of gradle project with build.gradle correctly):
call ale#test#SetFilename('gradle-test-files/build-gradle-project/src/main/kotlin/dummy.kt')
AssertEqual
\ ale#path#Simplify(g:dir . '/gradle-test-files/build-gradle-project'),
\ ale_linters#kotlin#languageserver#GetProjectRoot(bufnr(''))
Execute(Detect root of maven project with pom.xml correctly):
call ale#test#SetFilename('maven-test-files/maven-kotlin-project/src/main/kotlin/dummy.kt')
AssertEqual
\ ale#path#Simplify(g:dir . '/maven-test-files/maven-kotlin-project'),
\ ale_linters#kotlin#languageserver#GetProjectRoot(bufnr(''))
Execute(Detect no root in case of non maven/gradle project):
call ale#test#SetFilename('gradle-test-files/non-gradle-project/src/main/kotlin/dummy.kt')
AssertEqual
\ '',
\ ale_linters#kotlin#languageserver#GetProjectRoot(bufnr(''))