File: test_jsonlint.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 (31 lines) | stat: -rw-r--r-- 984 bytes parent folder | download
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
30
31
Before:
  call ale#assert#SetUpLinterTest('json', 'jsonlint')

After:
  call ale#assert#TearDownLinterTest()

Execute(local executable should be detected correctly):
  call ale#test#SetFilename('../test-files/jsonlint/app/src/app.json')

  AssertEqual
  \ ale#path#Simplify(g:dir . '/../test-files/jsonlint/app/node_modules/.bin/jsonlint'),
  \ ale_linters#json#jsonlint#GetExecutable(bufnr(''))
  \
Execute(use_global should override project executable):
  let g:ale_json_jsonlint_use_global = 1

  call ale#test#SetFilename('../test-files/jsonlint/app/src/app.json')

  AssertEqual
  \ 'jsonlint',
  \ ale_linters#json#jsonlint#GetExecutable(bufnr(''))
  \
Execute(manually defined should override default executable):
  let g:ale_json_jsonlint_use_global = 1
  let g:ale_json_jsonlint_executable = 'custom_jsonlint'

  call ale#test#SetFilename('../test-files/jsonlint/app/src/app.json')

  AssertEqual
  \ 'custom_jsonlint',
  \ ale_linters#json#jsonlint#GetExecutable(bufnr(''))