install.fairie/dotfiles/.vim/plugged/ale/test/fixers/test_jq_fixer_callback.vader
Git E2E Dev Test Username e149692cc9 git subrepo clone https://github.com/dense-analysis/ale.git ./dotfiles/.vim/plugged/ale
subrepo:
  subdir:   "dotfiles/.vim/plugged/ale"
  merged:   "e4b205440"
upstream:
  origin:   "https://github.com/dense-analysis/ale.git"
  branch:   "master"
  commit:   "e4b205440"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:37:09 -04:00

26 lines
611 B
Text

Before:
Save g:ale_json_jq_executable
Save g:ale_json_jq_options
Save g:ale_json_jq_filters
After:
Restore
Execute(The jq fixer should use the options you set):
let g:ale_json_jq_executable = 'foo'
let g:ale_json_jq_options = '--bar'
let g:ale_json_jq_filters = '.baz'
AssertEqual
\ {'command': ale#Escape('foo') . ' .baz --bar'},
\ ale#fixers#jq#Fix(bufnr(''))
Execute(The jq fixer should return 0 when there are no filters):
let g:ale_json_jq_executable = 'jq'
let g:ale_json_jq_options = ''
let g:ale_json_jq_filters = ''
AssertEqual
\ 0,
\ ale#fixers#jq#Fix(bufnr(''))