2021-02-21 12:35:26 +00:00
|
|
|
Before:
|
|
|
|
let g:ale_bazel_buildifier_options = ''
|
|
|
|
call ale#assert#SetUpFixerTest('bzl', 'buildifier')
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#assert#TearDownFixerTest()
|
|
|
|
|
|
|
|
Execute(The buildifier callback should return the correct default values):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/bazel/WORKSPACE')
|
2021-02-21 12:35:26 +00:00
|
|
|
|
|
|
|
AssertFixer
|
|
|
|
\ {
|
|
|
|
\ 'command': ale#Escape(g:ale_bazel_buildifier_executable)
|
2021-03-23 13:04:51 +00:00
|
|
|
\ . ' -mode fix -lint fix -path '
|
|
|
|
\ . ale#Escape(ale#test#GetFilename('../test-files/bazel/WORKSPACE'))
|
|
|
|
\ . ' -'
|
2021-02-21 12:35:26 +00:00
|
|
|
\ }
|
|
|
|
|
|
|
|
Execute(The buildifier callback should include any additional options):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/bazel/WORKSPACE')
|
2021-02-21 12:35:26 +00:00
|
|
|
let g:ale_bazel_buildifier_options = '--some-option'
|
|
|
|
|
|
|
|
AssertFixer
|
|
|
|
\ {
|
|
|
|
\ 'command': ale#Escape(g:ale_bazel_buildifier_executable)
|
2021-03-23 13:04:51 +00:00
|
|
|
\ . ' -mode fix -lint fix -path '
|
|
|
|
\ . ale#Escape(ale#test#GetFilename('../test-files/bazel/WORKSPACE'))
|
|
|
|
\ . ' --some-option -'
|
2021-02-21 12:35:26 +00:00
|
|
|
\ }
|