summaryrefslogtreecommitdiff
path: root/test/command_callback/test_markdown_mdl_command_callback.vader
blob: 3a68a4b21ca281cb401558cab9fdb99ae338ad6f (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
28
Before:
  Save g:ale_markdown_mdl_executable
  Save g:ale_markdown_mdl_options

  unlet! g:ale_markdown_mdl_executable
  unlet! g:ale_markdown_mdl_options

  runtime ale_linters/markdown/mdl.vim

After:
  Restore

  call ale#linter#Reset()

Execute(The default command should be correct):
  AssertEqual ale_linters#markdown#mdl#GetExecutable(bufnr('')), 'mdl'
  AssertEqual
  \ ale_linters#markdown#mdl#GetCommand(bufnr('')),
  \ ale#Escape('mdl')

Execute(The executable and options should be configurable):
  let g:ale_markdown_mdl_executable = 'foo bar'
  let g:ale_markdown_mdl_options = '--wat'

  AssertEqual ale_linters#markdown#mdl#GetExecutable(bufnr('')), 'foo bar'
  AssertEqual
  \ ale_linters#markdown#mdl#GetCommand(bufnr('')),
  \ ale#Escape('foo bar') . ' --wat'