summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
authorTy Coghlan <Coghlan.Ty@gmail.com>2018-08-27 01:12:56 -0400
committerTy Coghlan <Coghlan.Ty@gmail.com>2018-08-30 22:10:38 -0400
commit8e3bf10592b52ba96ce94c5819a19ee8de6f0899 (patch)
tree86f17f793726520f886211466c18fd53fb3182d7 /test/command_callback
parentea01cc708b4beed3831a10065664c84dba68b5dc (diff)
downloadale-8e3bf10592b52ba96ce94c5819a19ee8de6f0899.zip
added sbtserver linter
Diffstat (limited to 'test/command_callback')
-rw-r--r--test/command_callback/test_scala_sbtserver.vader25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/command_callback/test_scala_sbtserver.vader b/test/command_callback/test_scala_sbtserver.vader
new file mode 100644
index 00000000..40aacaf4
--- /dev/null
+++ b/test/command_callback/test_scala_sbtserver.vader
@@ -0,0 +1,25 @@
+" Author: ophirr33 <coghlan.ty@gmail.com>
+" Description: Tests for the sbt Server lsp linter
+
+Before:
+ call ale#assert#SetUpLinterTest('scala', 'sbtserver')
+After:
+ call ale#assert#TearDownLinterTest()
+Execute(should set sbtserver for sbt project with active.json):
+ call ale#test#SetFilename('../scala_fixtures/valid_sbt_project/Main.scala')
+ AssertLSPLanguage 'scala'
+ AssertLSPOptions {}
+ AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../scala_fixtures/valid_sbt_project')
+ AssertLSPAddress '127.0.0.1:5211'
+Execute(should not set sbtserver for sbt project without active.json):
+ call ale#test#SetFilename('../scala_fixtures/no_active_sbt_project/Main.scala')
+ AssertLSPLanguage 'scala'
+ AssertLSPOptions {}
+ AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../scala_fixtures/no_active_sbt_project')
+ AssertLSPAddress ''
+Execute(should not set sbtserver for sbt project without build.sbt):
+ call ale#test#SetFilename('../scala_fixtures/invalid_sbt_project/Main.scala')
+ AssertLSPLanguage 'scala'
+ AssertLSPOptions {}
+ AssertLSPProject ''
+ AssertLSPAddress ''