diff options
author | Evan Borden <eborden@users.noreply.github.com> | 2018-08-23 18:23:54 -0400 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2018-08-23 23:23:54 +0100 |
commit | 707b539969df55d9372135d8b15771693699d5ac (patch) | |
tree | ff86ab9bdc1160639e3ae4919defa98dad7b8ef4 /test/fixers | |
parent | 26005242744c6d88f0ec728964754909f4a73d94 (diff) | |
download | ale-707b539969df55d9372135d8b15771693699d5ac.zip |
Add hlint refactoring as a fixer (#1836)
Diffstat (limited to 'test/fixers')
-rw-r--r-- | test/fixers/test_hlint_fixer_callback.vader | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/fixers/test_hlint_fixer_callback.vader b/test/fixers/test_hlint_fixer_callback.vader new file mode 100644 index 00000000..48f26c7c --- /dev/null +++ b/test/fixers/test_hlint_fixer_callback.vader @@ -0,0 +1,25 @@ +Before: + Save g:ale_haskell_hlint_executable + + " Use an invalid global executable, so we don't match it. + let g:ale_haskell_hlint_executable = 'xxxinvalid' + + call ale#test#SetDirectory('/testplugin/test/fixers') + +After: + Restore + + call ale#test#RestoreDirectory() + +Execute(The hlint callback should return the correct default values): + call ale#test#SetFilename('../haskell_files/testfile.hs') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' --refactor' + \ . ' --refactor-options="--inplace"' + \ . ' %t', + \ }, + \ ale#fixers#hlint#Fix(bufnr('')) |