summaryrefslogtreecommitdiff
path: root/test/fixers/test_fecs_fixer_callback.vader
blob: 146c0a8748601f042c088469dbd8d9087f4dfbbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Before:
  call ale#assert#SetUpFixerTest('javascript', 'fecs')
  runtime autoload/ale/handlers/fecs.vim

After:
  call ale#assert#TearDownFixerTest()

Execute(The fecs fixer should respect to g:ale_javascript_fecs_executable):
  let g:ale_javascript_fecs_executable = '../test-files/fecs/fecs'
  let g:ale_javascript_fecs_use_global = 1

  AssertEqual
  \ {
  \   'command': ale#Escape(g:ale_javascript_fecs_executable) . ' format --replace=true %t',
  \   'read_temporary_file': 1,
  \ },
  \ ale#fixers#fecs#Fix(bufnr(''))

Execute(The fecs fixer should return 0 when executable not found):
  let g:ale_javascript_fecs_executable = 'fecs-invalid'
  let g:ale_javascript_fecs_use_global = 1
  AssertEqual
  \ 0,
  \ ale#fixers#fecs#Fix(bufnr(''))