From 47577564a2294668d7997b261e17fd97f0dd1fe6 Mon Sep 17 00:00:00 2001 From: w0rp Date: Thu, 5 Oct 2017 22:31:00 +0100 Subject: Get more command callback tests to pass on Windows --- .../test_scalastyle_command_callback.vader | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'test/command_callback/test_scalastyle_command_callback.vader') diff --git a/test/command_callback/test_scalastyle_command_callback.vader b/test/command_callback/test_scalastyle_command_callback.vader index f051b025..953d57b3 100644 --- a/test/command_callback/test_scalastyle_command_callback.vader +++ b/test/command_callback/test_scalastyle_command_callback.vader @@ -1,10 +1,16 @@ Before: + Save g:ale_scala_scalastyle_options + Save g:ale_scalastyle_config_loc + + unlet! g:ale_scala_scalastyle_options + unlet! g:ale_scalastyle_config_loc + runtime ale_linters/scala/scalastyle.vim After: + Restore + call ale#linter#Reset() - let g:ale_scala_scalastyle_options = '' - let g:ale_scalastyle_conf_loc = '' Execute(Should return the correct default command): AssertEqual @@ -15,13 +21,16 @@ Execute(Should allow using a custom config file): let g:ale_scalastyle_config_loc = '/dooper/config.xml' AssertEqual - \ 'scalastyle --config ''/dooper/config.xml'' %t', + \ 'scalastyle' + \ . ' --config ' . ale#Escape('/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', + \ 'scalastyle' + \ . ' --warnings false --quiet true' + \ . ' %t', \ ale_linters#scala#scalastyle#GetCommand(bufnr('')) - -- cgit v1.2.3