summaryrefslogtreecommitdiff
path: root/test/test_kotlin_languageserver_path_detection.vader
diff options
context:
space:
mode:
authorMTDL9 <40929090+MTDL9@users.noreply.github.com>2018-07-15 19:54:18 +0200
committerw0rp <w0rp@users.noreply.github.com>2018-07-15 18:54:18 +0100
commit5df735555cec5ab87f3cc74b9870482f921b0fbb (patch)
tree1b984ed59ea3419407107f4016011e8cc19b271c /test/test_kotlin_languageserver_path_detection.vader
parenta42999a639b2916b769a85f37d037be314d9d61b (diff)
downloadale-5df735555cec5ab87f3cc74b9870482f921b0fbb.zip
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
Diffstat (limited to 'test/test_kotlin_languageserver_path_detection.vader')
-rw-r--r--test/test_kotlin_languageserver_path_detection.vader25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test_kotlin_languageserver_path_detection.vader b/test/test_kotlin_languageserver_path_detection.vader
new file mode 100644
index 00000000..36e6368e
--- /dev/null
+++ b/test/test_kotlin_languageserver_path_detection.vader
@@ -0,0 +1,25 @@
+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(''))