summaryrefslogtreecommitdiff
path: root/test/fixers/test_pandoc_fixer_callback.vader
blob: a364ee563cc39429b5cf6f284359ca2e49a02a3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Before:
  Save g:ale_markdown_pandoc_executable
  Save g:ale_markdown_pandoc_options

After:
  Restore

Execute(The pandoc callback should return 'pandoc' as default command):
  setlocal noexpandtab
  Assert
  \ ale#fixers#pandoc#Fix(bufnr('')).command =~# '^' . ale#Escape('pandoc'),
  \ "Default command name is expected to be 'pandoc'"

Execute(The pandoc executable and options should be configurable):
  let g:ale_markdown_pandoc_executable = 'foobar'
  let g:ale_markdown_pandoc_options = '--some-option'

  AssertEqual
  \ {
  \   'command': ale#Escape('foobar')
  \     . ' --some-option',
  \ },
  \ ale#fixers#pandoc#Fix(bufnr(''))