diff options
author | w0rp <w0rp@users.noreply.github.com> | 2017-10-24 22:13:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-24 22:13:04 +0100 |
commit | 0e4dd95e5dac4ef5ac7877b1885f1c8300a53bd3 (patch) | |
tree | 6c9706548e6c7d9f393526c851907d8f313961d8 /test | |
parent | 5a91f7e19f1eab027bfd93098d80e1cdd847f918 (diff) | |
parent | be1377f6d7e642a8b56bb0589dc9cc48fc836c13 (diff) | |
download | ale-0e4dd95e5dac4ef5ac7877b1885f1c8300a53bd3.zip |
Merge pull request #1017 from carakan/elixir_format
`mix format` new fixer for elixir lang
Diffstat (limited to 'test')
-rw-r--r-- | test/elixir-test-files/testfile.ex | 0 | ||||
-rw-r--r-- | test/fixers/test_mix_format_fixer_callback.vader | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/elixir-test-files/testfile.ex b/test/elixir-test-files/testfile.ex new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/elixir-test-files/testfile.ex diff --git a/test/fixers/test_mix_format_fixer_callback.vader b/test/fixers/test_mix_format_fixer_callback.vader new file mode 100644 index 00000000..c6c97c57 --- /dev/null +++ b/test/fixers/test_mix_format_fixer_callback.vader @@ -0,0 +1,20 @@ +Before: + call ale#test#SetDirectory('/testplugin/test/fixers') + Save g:ale_elixir_mix_executable + + let g:ale_elixir_mix_executable = 'xxxinvalid' + +After: + call ale#test#RestoreDirectory() + +Execute(The mix_format callback should return the correct default values): + call ale#test#SetFilename('../elixir-test-files/testfile.ex') + + AssertEqual + \ { + \ 'read_temporary_file': 1, + \ 'command': ale#Escape('xxxinvalid') + \ . ' format %t', + \ }, + \ ale#fixers#mix_format#Fix(bufnr('')) + |