mirror of
https://github.com/dense-analysis/ale.git
synced 2026-04-28 10:05:31 +08:00
7940a46d5a
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
- Use ale#Set() to set the ale_c_build_dir_names variable. - Ensure SetUpLinterTest() is called before any Save commands in tests. - Add c.vim to runtime before non-linter tests are executed. - Remove workarounds in c.vim.
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
Before:
|
|
runtime autoload/ale/c.vim
|
|
Save g:ale_c_build_dir_names
|
|
|
|
call ale#test#SetDirectory('/testplugin/test')
|
|
|
|
After:
|
|
Restore
|
|
|
|
call ale#test#RestoreDirectory()
|
|
|
|
Execute(FindCompileCommands should find compile_commands.json with relative build dir names):
|
|
call ale#test#SetFilename('test-files/c/json_project/subdir/dummy')
|
|
|
|
let g:ale_c_build_dir_names = ['build']
|
|
|
|
AssertEqual
|
|
\ [
|
|
\ ale#path#Simplify(g:dir . '/test-files/c/json_project'),
|
|
\ ale#path#Simplify(g:dir . '/test-files/c/json_project/build/compile_commands.json'),
|
|
\ ],
|
|
\ ale#c#FindCompileCommands(bufnr(''))
|
|
|
|
Execute(FindCompileCommands should find compile_commands.json with absolute build dir names):
|
|
call ale#test#SetFilename('test-files/c/json_project/subdir/dummy')
|
|
|
|
let g:ale_c_build_dir_names = [ale#path#Simplify(g:dir . '/test-files/c/json_project/build')]
|
|
|
|
AssertEqual
|
|
\ [
|
|
\ ale#path#Simplify(g:dir . '/test-files/c/json_project'),
|
|
\ ale#path#Simplify(g:dir . '/test-files/c/json_project/build/compile_commands.json'),
|
|
\ ],
|
|
\ ale#c#FindCompileCommands(bufnr(''))
|