summaryrefslogtreecommitdiff
path: root/test/command_callback/test_scalastyle_command_callback.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/command_callback/test_scalastyle_command_callback.vader')
-rw-r--r--test/command_callback/test_scalastyle_command_callback.vader27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/command_callback/test_scalastyle_command_callback.vader b/test/command_callback/test_scalastyle_command_callback.vader
new file mode 100644
index 00000000..f051b025
--- /dev/null
+++ b/test/command_callback/test_scalastyle_command_callback.vader
@@ -0,0 +1,27 @@
+Before:
+ runtime ale_linters/scala/scalastyle.vim
+
+After:
+ call ale#linter#Reset()
+ let g:ale_scala_scalastyle_options = ''
+ let g:ale_scalastyle_conf_loc = ''
+
+Execute(Should return the correct default command):
+ AssertEqual
+ \ 'scalastyle %t',
+ \ ale_linters#scala#scalastyle#GetCommand(bufnr(''))
+
+Execute(Should allow using a custom config file):
+ let g:ale_scalastyle_config_loc = '/dooper/config.xml'
+
+ AssertEqual
+ \ 'scalastyle --config ''/dooper/config.xml'' %t',
+ \ ale_linters#scala#scalastyle#GetCommand(bufnr(''))
+
+Execute(Should allow using custom options):
+ let g:ale_scala_scalastyle_options = '--warnings false --quiet true'
+
+ AssertEqual
+ \ 'scalastyle --config ''/dooper/config.xml'' --warnings false --quiet true %t',
+ \ ale_linters#scala#scalastyle#GetCommand(bufnr(''))
+