aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/test_proselint_get_command.vader
blob: 06a91dc8c6b665c45af759435cc206052b8325a5 (plain) (blame)
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:
  runtime autoload/ale/proselint.vim

  let b:ale_proselint_executable = 'proselint'

After:
  unlet! b:ale_proselint_executable

Execute(Command for proselint >= 0.16.0 should use 'check'):
  AssertEqual
  \ ale#Escape('proselint') . ' check %t',
  \ ale#proselint#GetCommand(bufnr(''), [0, 16, 0])

  AssertEqual
  \ ale#Escape('proselint') . ' check %t',
  \ ale#proselint#GetCommand(bufnr(''), [0, 17, 0])

Execute(Command for proselint < 0.16.0 should use standard arguments):
  AssertEqual
  \ ale#Escape('proselint') . ' %t',
  \ ale#proselint#GetCommand(bufnr(''), [0, 15, 0])

Execute(Command should respect custom executable path):
  let b:ale_proselint_executable = '/custom/path/to/proselint'

  AssertEqual
  \ ale#Escape('/custom/path/to/proselint') . ' check %t',
  \ ale#proselint#GetCommand(bufnr(''), [0, 16, 0])