mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 05:22:31 +08:00
add nimpretty fixer
This commit is contained in:
27
test/fixers/test_nimpretty_fixer_callback.vader
Normal file
27
test/fixers/test_nimpretty_fixer_callback.vader
Normal file
@@ -0,0 +1,27 @@
|
||||
Before:
|
||||
call ale#assert#SetUpFixerTest('nim', 'nimpretty')
|
||||
|
||||
After:
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The nimpretty callback should return the correct default values):
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': ale#Escape(g:ale_nim_nimpretty_executable)
|
||||
\ . ' %t --maxLineLen:80'
|
||||
\ },
|
||||
\ ale#fixers#nimpretty#Fix(bufnr(''))
|
||||
|
||||
Execute(The nimpretty callback should include any additional options):
|
||||
let g:ale_nim_nimpretty_options = '--some-option'
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': ale#Escape(g:ale_nim_nimpretty_executable)
|
||||
\ . ' %t'
|
||||
\ . ' --some-option',
|
||||
\ },
|
||||
\ ale#fixers#nimpretty#Fix(bufnr(''))
|
||||
Reference in New Issue
Block a user