summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2019-05-01 22:43:44 +0100
committerGitHub <noreply@github.com>2019-05-01 22:43:44 +0100
commit5d65f9303326a2b6be0f3e0492a04277fb4f7376 (patch)
tree3bc65f43cff8d830e01c95a8660dd4bf7f427481 /test
parenteae124e8ce7d2503b7f803da6c450501dc4b7410 (diff)
parent99361b2ca92bb6b70056ee558088e386745435a6 (diff)
downloadale-5d65f9303326a2b6be0f3e0492a04277fb4f7376.zip
Merge pull request #2437 from robertjlooby/add-floskell
Add floskell for Haskell formatting
Diffstat (limited to 'test')
-rw-r--r--test/fixers/test_floskell_fixer_callback.vader23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/fixers/test_floskell_fixer_callback.vader b/test/fixers/test_floskell_fixer_callback.vader
new file mode 100644
index 00000000..66fe9200
--- /dev/null
+++ b/test/fixers/test_floskell_fixer_callback.vader
@@ -0,0 +1,23 @@
+Before:
+ Save g:ale_haskell_floskell_executable
+
+ " Use an invalid global executable, so we don't match it.
+ let g:ale_haskell_floskell_executable = 'xxxinvalid'
+
+ call ale#test#SetDirectory('/testplugin/test/fixers')
+
+After:
+ Restore
+
+ call ale#test#RestoreDirectory()
+
+Execute(The floskell callback should return the correct default values):
+ call ale#test#SetFilename('../haskell_files/testfile.hs')
+
+ AssertEqual
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Escape('xxxinvalid')
+ \ . ' %t',
+ \ },
+ \ ale#fixers#floskell#Fix(bufnr(''))