mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-30 22:55:30 +08:00
Merge pull request #1770 from fredemmott/hack
Split Hack out from PHP, modernize
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
Before:
|
||||
Save g:ale_php_hackfmt_executable
|
||||
Save g:ale_php_hackfmt_options
|
||||
Save g:ale_hack_hackfmt_executable
|
||||
Save g:ale_hack_hackfmt_options
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_php_hackfmt_executable = 'xxxinvalid'
|
||||
let g:ale_php_hackfmt_options = ''
|
||||
let g:ale_hack_hackfmt_executable = 'xxxinvalid'
|
||||
let g:ale_hack_hackfmt_options = ''
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
|
||||
@@ -14,7 +14,7 @@ After:
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The hackfmt callback should return the correct default values):
|
||||
call ale#test#SetFilename('../hack_files/testfile.php')
|
||||
call ale#test#SetFilename('../hack_files/testfile.hack')
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
@@ -25,8 +25,8 @@ Execute(The hackfmt callback should return the correct default values):
|
||||
\ ale#fixers#hackfmt#Fix(bufnr(''))
|
||||
|
||||
Execute(The hackfmt callback should include custom hackfmt options):
|
||||
let g:ale_php_hackfmt_options = "--some-option"
|
||||
call ale#test#SetFilename('../hack_files/testfile.php')
|
||||
let g:ale_hack_hackfmt_options = "--some-option"
|
||||
call ale#test#SetFilename('../hack_files/testfile.hack')
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
|
||||
Reference in New Issue
Block a user