Files
ale/test/linter/test_jsonlint.vader
w0rp bf55175b69 #4454 Clean up root test directory tests
Combine cases into smaller tests of tests and remove tests we no longer
need. Linter tests have been moved to where they should be.
2023-09-08 01:00:35 +01:00

32 lines
984 B
Plaintext

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(''))