X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/linter/test_jsonlint.vader?ds=sidebyside diff --git a/.vim/bundle/ale/test/linter/test_jsonlint.vader b/.vim/bundle/ale/test/linter/test_jsonlint.vader new file mode 100644 index 00000000..52bbe248 --- /dev/null +++ b/.vim/bundle/ale/test/linter/test_jsonlint.vader @@ -0,0 +1,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(''))