summaryrefslogtreecommitdiff
path: root/test/fixers/test_dhall_lint_fixer_callback.vader
blob: c60b7a73886eeb5dcd1e4f24834efcec1d3ec4e8 (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
25
26
27
Before:
  Save g:ale_dhall_executable
  Save g:ale_dhall_options

  " Use an invalid global executable, so we don’t match it.
  let g:ale_dhall_executable = 'odd-dhall'
  let g:ale_dhall_options = '--ascii'

  call ale#test#SetDirectory('/testplugin/test/dhall')

After:
  Restore

  call ale#test#RestoreDirectory()

Execute(The dhall-lint callback should return the correct options):
  call ale#test#SetFilename('../dhall_files/testfile.dhall')

  AssertEqual
  \ {
  \   'command': ale#Escape('odd-dhall')
  \     . ' --ascii'
  \     . ' lint'
  \     . ' --inplace %t',
  \   'read_temporary_file': 1,
  \ },
  \ ale#fixers#dhall_lint#Fix(bufnr(''))