mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-18 10:15:56 +08:00
24
test/fixers/test_ormolu_fixer_callback.vader
Normal file
24
test/fixers/test_ormolu_fixer_callback.vader
Normal file
@@ -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(''))
|
||||
Reference in New Issue
Block a user