mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Add alejandra for nix (#4435)
- Fixes https://github.com/dense-analysis/ale/issues/4434
This commit is contained in:
24
test/fixers/test_alejandra_fixer_callback.vader
Normal file
24
test/fixers/test_alejandra_fixer_callback.vader
Normal file
@@ -0,0 +1,24 @@
|
||||
Before:
|
||||
Save g:ale_nix_alejandra_executable
|
||||
Save g:ale_nix_alejandra_options
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
Execute(The alejandra callback should return the correct default values):
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('alejandra') . ' -- -'
|
||||
\ },
|
||||
\ ale#fixers#alejandra#Fix(bufnr(''))
|
||||
|
||||
Execute(The alejandra executable and options should be configurable):
|
||||
let g:ale_nix_alejandra_executable = '/path/to/alejandra'
|
||||
let g:ale_nix_alejandra_options = '-q'
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('/path/to/alejandra')
|
||||
\ . ' -q -- -',
|
||||
\ },
|
||||
\ ale#fixers#alejandra#Fix(bufnr(''))
|
||||
Reference in New Issue
Block a user