summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-03-18 17:36:33 +0000
committerGitHub <noreply@github.com>2018-03-18 17:36:33 +0000
commit92612a9eab34432dd0a5fc1eb3075a47d35163fa (patch)
treecc72385dae3228d8c92073e41e0cbaf56184f193 /test/fixers
parent1b1e53ef6101e98ff34044a127758513dbf662e4 (diff)
parent6320ce66742fd8bf73b8f77341669b2c1505c47d (diff)
downloadale-92612a9eab34432dd0a5fc1eb3075a47d35163fa.zip
Merge pull request #1410 from fribmendes/frm/mix_format_options
Allow passing options to mix_format
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/test_mix_format_fixer_callback.vader14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/fixers/test_mix_format_fixer_callback.vader b/test/fixers/test_mix_format_fixer_callback.vader
index c6c97c57..7bd7c77b 100644
--- a/test/fixers/test_mix_format_fixer_callback.vader
+++ b/test/fixers/test_mix_format_fixer_callback.vader
@@ -1,6 +1,7 @@
Before:
call ale#test#SetDirectory('/testplugin/test/fixers')
Save g:ale_elixir_mix_executable
+ Save g:ale_elixir_mix_format_options
let g:ale_elixir_mix_executable = 'xxxinvalid'
@@ -14,7 +15,18 @@ Execute(The mix_format callback should return the correct default values):
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('xxxinvalid')
- \ . ' format %t',
+ \ . ' format %t',
\ },
\ ale#fixers#mix_format#Fix(bufnr(''))
+Execute(The mix_format callback should include the correct format options):
+ let g:ale_elixir_mix_format_options = 'invalid_options'
+ call ale#test#SetFilename('../elixir-test-files/testfile.ex')
+
+ AssertEqual
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Escape('xxxinvalid')
+ \ . ' format invalid_options %t',
+ \ },
+ \ ale#fixers#mix_format#Fix(bufnr(''))