summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
Diffstat (limited to 'test/command_callback')
-rw-r--r--test/command_callback/test_fsc_command_callback.vader17
-rw-r--r--test/command_callback/test_scalac_command_callback.vader17
2 files changed, 34 insertions, 0 deletions
diff --git a/test/command_callback/test_fsc_command_callback.vader b/test/command_callback/test_fsc_command_callback.vader
new file mode 100644
index 00000000..451fa108
--- /dev/null
+++ b/test/command_callback/test_fsc_command_callback.vader
@@ -0,0 +1,17 @@
+Before:
+ runtime ale_linters/scala/fsc.vim
+
+After:
+ call ale#linter#Reset()
+
+Given scala(An empty Scala file):
+Execute(The default executable and command should be correct):
+ AssertEqual 'fsc', ale_linters#scala#fsc#GetExecutable(bufnr(''))
+ AssertEqual
+ \ ale#Escape('fsc') . ' -Ystop-after:parser %t',
+ \ ale_linters#scala#fsc#GetCommand(bufnr(''))
+
+Given scala.sbt(An empty SBT file):
+Execute(fsc should not be run for sbt files):
+ AssertEqual '', ale_linters#scala#fsc#GetExecutable(bufnr(''))
+ AssertEqual '', ale_linters#scala#fsc#GetCommand(bufnr(''))
diff --git a/test/command_callback/test_scalac_command_callback.vader b/test/command_callback/test_scalac_command_callback.vader
new file mode 100644
index 00000000..6bb31b3f
--- /dev/null
+++ b/test/command_callback/test_scalac_command_callback.vader
@@ -0,0 +1,17 @@
+Before:
+ runtime ale_linters/scala/scalac.vim
+
+After:
+ call ale#linter#Reset()
+
+Given scala(An empty Scala file):
+Execute(The default executable and command should be correct):
+ AssertEqual 'scalac', ale_linters#scala#scalac#GetExecutable(bufnr(''))
+ AssertEqual
+ \ ale#Escape('scalac') . ' -Ystop-after:parser %t',
+ \ ale_linters#scala#scalac#GetCommand(bufnr(''))
+
+Given scala.sbt(An empty SBT file):
+Execute(scalac should not be run for sbt files):
+ AssertEqual '', ale_linters#scala#scalac#GetExecutable(bufnr(''))
+ AssertEqual '', ale_linters#scala#scalac#GetCommand(bufnr(''))