mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-29 07:16:53 +08:00
Merge pull request #1017 from carakan/elixir_format
`mix format` new fixer for elixir lang
This commit is contained in:
0
test/elixir-test-files/testfile.ex
Normal file
0
test/elixir-test-files/testfile.ex
Normal file
20
test/fixers/test_mix_format_fixer_callback.vader
Normal file
20
test/fixers/test_mix_format_fixer_callback.vader
Normal file
@@ -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(''))
|
||||
|
||||
Reference in New Issue
Block a user