File: test_swaglint.vader

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (29 lines) | stat: -rw-r--r-- 1,204 bytes parent folder | download | duplicates (2)
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
29
Before:
  call ale#assert#SetUpLinterTest('yaml', 'swaglint')

After:
  call ale#assert#TearDownLinterTest()

Execute(The yaml swaglint command callback should return the correct default string):
  AssertLinter 'swaglint', ale#Escape('swaglint') . ' -r compact --stdin'

Execute(The yaml swaglint command callback should be configurable):
  let g:ale_yaml_swaglint_executable = '~/.local/bin/swaglint'

  AssertLinter '~/.local/bin/swaglint',
  \ ale#Escape('~/.local/bin/swaglint') . ' -r compact --stdin'

Execute(The yaml swaglint command callback should allow a global installation to be used):
  let g:ale_yaml_swaglint_executable = '/usr/local/bin/swaglint'
  let g:ale_yaml_swaglint_use_global = 1

  AssertLinter '/usr/local/bin/swaglint',
  \ ale#Escape('/usr/local/bin/swaglint') . ' -r compact --stdin'

Execute(The yaml swaglint command callback should allow a local installation to be used):
  call ale#test#SetFilename('../test-files/swaglint/docs/swagger.yaml')

  AssertLinter
  \ ale#path#Simplify(g:dir . '/../test-files/swaglint/node_modules/.bin/swaglint'),
  \ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/swaglint/node_modules/.bin/swaglint'))
  \   . ' -r compact --stdin'