summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-12-07 19:15:33 +0000
committerGitHub <noreply@github.com>2017-12-07 19:15:33 +0000
commit7a71186d62d1964e191dc723d8b65ab7786e0063 (patch)
tree5fe52e583145a16e5a88fd93ba333636516352a3 /test
parentc6fc9cdb7b31823cafc1e86dc4555a595abc9aee (diff)
parentfbc8ac95539b6b1672e824a2df0422fdeb32f5c6 (diff)
downloadale-7a71186d62d1964e191dc723d8b65ab7786e0063.zip
Merge pull request #1174 from eborden/eborden/add-brittany-for-haskell-formatting
Add brittany for Haskell formatting
Diffstat (limited to 'test')
-rw-r--r--test/fixers/test_brittany_fixer_callback.vader23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/fixers/test_brittany_fixer_callback.vader b/test/fixers/test_brittany_fixer_callback.vader
new file mode 100644
index 00000000..a0182b52
--- /dev/null
+++ b/test/fixers/test_brittany_fixer_callback.vader
@@ -0,0 +1,23 @@
+Before:
+ Save g:ale_haskell_brittany_executable
+
+ " Use an invalid global executable, so we don't match it.
+ let g:ale_haskell_brittany_executable = 'xxxinvalid'
+
+ call ale#test#SetDirectory('/testplugin/test/fixers')
+
+After:
+ Restore
+
+ call ale#test#RestoreDirectory()
+
+Execute(The brittany 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#brittany#Fix(bufnr(''))