This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/fixers/test_erlfmt_fixer_callback.vader

26 lines
583 B
Text
Raw Normal View History

Before:
Save b:ale_elm_format_executable
Save b:ale_elm_format_options
let b:ale_elm_format_executable = 'erlfmt'
let b:ale_elm_format_options = ''
After:
Restore
Execute(The erlfmt command should handle empty options):
AssertEqual
\ {
\ 'command': ale#Escape('erlfmt') . ' %s'
\ },
\ ale#fixers#erlfmt#Fix(bufnr(''))
Execute(The erlfmt command should handle custom options):
let b:ale_erlang_erlfmt_options = '--insert-pragma'
AssertEqual
\ {
\ 'command': ale#Escape('erlfmt') . ' --insert-pragma %s'
\ },
\ ale#fixers#erlfmt#Fix(bufnr(''))