From 9fe7b1fe6a23fb55e6d782293585d58193123f59 Mon Sep 17 00:00:00 2001 From: w0rp Date: Mon, 1 Mar 2021 20:11:10 +0000 Subject: Close #2281 - Separate cwd commands from commands Working directories are now set seperately from the commands so they can later be swapped out when running linters over projects is supported, and also better support filename mapping for running linters on other machines in future. --- .../test_haskell_cabal_ghc_command_callbacks.vader | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader') diff --git a/test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader b/test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader index 9e3712d6..b4976b34 100644 --- a/test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader +++ b/test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader @@ -1,23 +1,13 @@ Before: - Save g:ale_haskell_cabal_ghc_options - - unlet! g:ale_haskell_cabal_ghc_options - unlet! b:ale_haskell_cabal_ghc_options - - runtime ale_linters/haskell/cabal_ghc.vim + call ale#assert#SetUpLinterTest('haskell', 'cabal_ghc') After: - Restore - unlet! b:ale_haskell_cabal_ghc_options - call ale#linter#Reset() + call ale#assert#TearDownLinterTest() Execute(The options should be used in the command): - AssertEqual - \ ale#path#BufferCdString(bufnr('')) . 'cabal exec -- ghc -fno-code -v0 %t', - \ ale_linters#haskell#cabal_ghc#GetCommand(bufnr('')) + AssertLinterCwd '%s:h' + AssertLinter 'cabal', 'cabal exec -- ghc -fno-code -v0 %t' let b:ale_haskell_cabal_ghc_options = 'foobar' - AssertEqual - \ ale#path#BufferCdString(bufnr('')) . 'cabal exec -- ghc foobar %t', - \ ale_linters#haskell#cabal_ghc#GetCommand(bufnr('')) + AssertLinter 'cabal', 'cabal exec -- ghc foobar %t' -- cgit v1.2.3