diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-07-22 14:12:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-22 14:12:23 +0100 |
commit | baa44bb3a7a99b296d45d8790c3341fd397d61bb (patch) | |
tree | 2bd5fd3485555904235962ddf1dee3a6eb1175be /test/command_callback | |
parent | 89805919379645ae00dfe132e88b5db8e0601e17 (diff) | |
parent | ac6bc6d0ae279c70081cba4225de2df54688757d (diff) | |
download | ale-baa44bb3a7a99b296d45d8790c3341fd397d61bb.zip |
Merge pull request #1742 from typetetris/master
Add cabal-ghc linter
Diffstat (limited to 'test/command_callback')
-rw-r--r-- | test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader b/test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader new file mode 100644 index 00000000..650aefa3 --- /dev/null +++ b/test/command_callback/test_haskell_cabal_ghc_command_callbacks.vader @@ -0,0 +1,23 @@ +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 + +After: + Restore + unlet! b:ale_haskell_cabal_ghc_options + call ale#linter#Reset() + +Execute(The options should be used in the command): + AssertEqual + \ 'cabal exec -- ghc -fno-code -v0 %t', + \ ale_linters#haskell#cabal_ghc#GetCommand(bufnr('')) + + let b:ale_haskell_cabal_ghc_options = 'foobar' + + AssertEqual + \ 'cabal exec -- ghc foobar %t', + \ ale_linters#haskell#cabal_ghc#GetCommand(bufnr('')) |