summaryrefslogtreecommitdiff
path: root/test/fixers/test_nimpretty_fixer_callback.vader
blob: a26f649a6f57c7151b694e4bbbe3e9d3f43c12f3 (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:
  call ale#assert#SetUpFixerTest('nim', 'nimpretty')

After:
  call ale#assert#TearDownFixerTest()

Execute(The nimpretty callback should return the correct default values):
  AssertEqual
  \ {
  \   'read_temporary_file': 1,
  \   'command': ale#Escape('nimpretty') . ' %t --maxLineLen:80'
  \ },
  \ ale#fixers#nimpretty#Fix(bufnr(''))

Execute(The nimpretty callback should include any additional options):
  let g:ale_nim_nimpretty_options = '--some-option'

  AssertEqual
  \ {
  \   'read_temporary_file': 1,
  \   'command': ale#Escape('nimpretty') . ' %t --some-option'
  \ },
  \ ale#fixers#nimpretty#Fix(bufnr(''))