All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 call ale#assert#SetUpLinterTest('objc', 'ccls')
4 Save b:ale_c_build_dir_names
5 Save b:ale_objc_ccls_executable
6 Save b:ale_objc_ccls_init_options
9 call ale#assert#TearDownLinterTest()
11 Execute(The project root should be detected correctly using compile_commands.json file):
12 call ale#test#SetFilename(tempname() . '/dummy.m')
16 call ale#test#SetFilename('../test-files/ccls/with_compile_commands_json/dummy.m')
18 AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_compile_commands_json')
20 Execute(The project root should be detected correctly using .ccls file):
21 call ale#test#SetFilename(tempname() . '/dummy.m')
25 call ale#test#SetFilename('../test-files/ccls/with_ccls/dummy.m')
27 AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_ccls')
29 Execute(The project root should be detected correctly using .ccls-root file):
30 call ale#test#SetFilename(tempname() . '/dummy.m')
34 call ale#test#SetFilename('../test-files/ccls/with_ccls-root/dummy.m')
36 AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/ccls/with_ccls-root')
38 Execute(The executable should be configurable):
39 AssertLinter 'ccls', ale#Escape('ccls')
41 let b:ale_objc_ccls_executable = 'foobar'
43 AssertLinter 'foobar', ale#Escape('foobar')
45 Execute(The initialization options should be configurable):
48 let b:ale_objc_ccls_init_options = { 'cacheDirectory': '/tmp/ccls' }
50 AssertLSPOptions { 'cacheDirectory': '/tmp/ccls' }
52 Execute(The compile command database should be detected correctly):
53 call ale#test#SetFilename('../test-files/ccls/with_ccls/dummy.c')
57 call ale#test#SetFilename('../test-files/ccls/with_compile_commands_json/dummy.c')
59 AssertLSPOptions { 'compilationDatabaseDirectory':
60 \ ale#path#Simplify(g:dir . '/../test-files/ccls/with_compile_commands_json') }
62 call ale#test#SetFilename('../test-files/ccls/with_build_dir/dummy.c')
63 let b:ale_c_build_dir_names = ['unusual_build_dir_name']
65 AssertLSPOptions { 'compilationDatabaseDirectory':
66 \ ale#path#Simplify(g:dir . '/../test-files/ccls/with_build_dir/unusual_build_dir_name') }