summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2020-11-21 20:25:13 +0000
committerGitHub <noreply@github.com>2020-11-21 20:25:13 +0000
commit96428425fe9ce8c5fa0718af2c6fe58deb61fadc (patch)
tree0cc28bc58977ef655e233967cf75decaf6c57781 /test
parent2873be2d6a5e383edd1fead396a53a8a38eebd76 (diff)
parentb496c4b1648cd15f8f6918d7c29853a8a04525c4 (diff)
downloadale-96428425fe9ce8c5fa0718af2c6fe58deb61fadc.zip
Merge pull request #2903 from davidtwco/ormolu-fixer
Add ormolu fixer.
Diffstat (limited to 'test')
-rw-r--r--test/fixers/test_ormolu_fixer_callback.vader24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/fixers/test_ormolu_fixer_callback.vader b/test/fixers/test_ormolu_fixer_callback.vader
new file mode 100644
index 00000000..8df3fca9
--- /dev/null
+++ b/test/fixers/test_ormolu_fixer_callback.vader
@@ -0,0 +1,24 @@
+Before:
+ Save g:ale_haskell_ormolu_executable
+ Save g:ale_haskell_ormolu_options
+
+After:
+ Restore
+
+Execute(The ormolu callback should return the correct default values):
+ AssertEqual
+ \ {
+ \ 'command': ale#Escape('ormolu')
+ \ },
+ \ ale#fixers#ormolu#Fix(bufnr(''))
+
+Execute(The ormolu executable and options should be configurable):
+ let g:ale_nix_nixpkgsfmt_executable = '/path/to/ormolu'
+ let g:ale_nix_nixpkgsfmt_options = '-h'
+
+ AssertEqual
+ \ {
+ \ 'command': ale#Escape('/path/to/ormolu')
+ \ . ' -h',
+ \ },
+ \ ale#fixers#nixpkgsfmt#Fix(bufnr(''))