diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-09-28 09:02:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-28 09:02:00 +0100 |
commit | a26b3319a1f37c82be8098b6eae4e6f2985a31eb (patch) | |
tree | 309edf6f0218f5728b3ef28c7a0ed100fe8ca45f /test/command_callback | |
parent | fd0467f9927d0bf5ee88b157c1978c3b69509460 (diff) | |
parent | 8891b7c349328120e5ec3f8022399f884a67e088 (diff) | |
download | ale-a26b3319a1f37c82be8098b6eae4e6f2985a31eb.zip |
Merge pull request #1950 from yejingchen/ccls
Add ccls support for C/C++/ObjC
Diffstat (limited to 'test/command_callback')
6 files changed, 126 insertions, 0 deletions
diff --git a/test/command_callback/ccls_paths/with_ccls-root/.ccls-root b/test/command_callback/ccls_paths/with_ccls-root/.ccls-root new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/command_callback/ccls_paths/with_ccls-root/.ccls-root diff --git a/test/command_callback/ccls_paths/with_ccls/.ccls b/test/command_callback/ccls_paths/with_ccls/.ccls new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/command_callback/ccls_paths/with_ccls/.ccls diff --git a/test/command_callback/ccls_paths/with_compile_commands_json/compile_commands.json b/test/command_callback/ccls_paths/with_compile_commands_json/compile_commands.json new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/command_callback/ccls_paths/with_compile_commands_json/compile_commands.json diff --git a/test/command_callback/test_c_ccls_command_callbacks.vader b/test/command_callback/test_c_ccls_command_callbacks.vader new file mode 100644 index 00000000..b8f3ab5b --- /dev/null +++ b/test/command_callback/test_c_ccls_command_callbacks.vader @@ -0,0 +1,43 @@ +" Author: Ye Jingchen <ye.jingchen@gmail.com>, Ben Falconer <ben@falconers.me.uk> +" Description: A language server for C + +Before: + call ale#assert#SetUpLinterTest('c', 'ccls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The project root should be detected correctly using compile_commands.json file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_compile_commands_json/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_compile_commands_json') + +Execute(The project root should be detected correctly using .ccls file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_ccls/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_ccls') + +Execute(The project root should be detected correctly using .ccls-root file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_ccls-root/dummy.c') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_ccls-root') + +Execute(The executable should be configurable): + AssertLinter 'ccls', ale#Escape('ccls') + + let b:ale_c_ccls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The initialization options should be configurable): + AssertLSPOptions {} + + let b:ale_c_ccls_init_options = { 'cacheDirectory': '/tmp/ccls' } + + AssertLSPOptions { 'cacheDirectory': '/tmp/ccls' } diff --git a/test/command_callback/test_cpp_ccls_command_callbacks.vader b/test/command_callback/test_cpp_ccls_command_callbacks.vader new file mode 100644 index 00000000..38947acf --- /dev/null +++ b/test/command_callback/test_cpp_ccls_command_callbacks.vader @@ -0,0 +1,43 @@ +" Author: Ye Jingchen <ye.jingchen@gmail.com>, Ben Falconer <ben@falconers.me.uk> +" Description: A language server for C++ + +Before: + call ale#assert#SetUpLinterTest('cpp', 'ccls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The project root should be detected correctly using compile_commands.json file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_compile_commands_json/dummy.cpp') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_compile_commands_json') + +Execute(The project root should be detected correctly using .ccls file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_ccls/dummy.cpp') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_ccls') + +Execute(The project root should be detected correctly using .ccls-root file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_ccls-root/dummy.cpp') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_ccls-root') + +Execute(The executable should be configurable): + AssertLinter 'ccls', ale#Escape('ccls') + + let b:ale_cpp_ccls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The initialization options should be configurable): + AssertLSPOptions {} + + let b:ale_cpp_ccls_init_options = { 'cacheDirectory': '/tmp/ccls' } + + AssertLSPOptions { 'cacheDirectory': '/tmp/ccls' } diff --git a/test/command_callback/test_objc_ccls_command_callbacks.vader b/test/command_callback/test_objc_ccls_command_callbacks.vader new file mode 100644 index 00000000..9d0c7690 --- /dev/null +++ b/test/command_callback/test_objc_ccls_command_callbacks.vader @@ -0,0 +1,40 @@ +Before: + call ale#assert#SetUpLinterTest('objc', 'ccls') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The project root should be detected correctly using compile_commands.json file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_compile_commands_json/dummy.m') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_compile_commands_json') + +Execute(The project root should be detected correctly using .ccls file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_ccls/dummy.m') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_ccls') + +Execute(The project root should be detected correctly using .ccls-root file): + AssertLSPProject '' + + call ale#test#SetFilename('ccls_paths/with_ccls-root/dummy.m') + + AssertLSPProject ale#path#Simplify(g:dir . '/ccls_paths/with_ccls-root') + +Execute(The executable should be configurable): + AssertLinter 'ccls', ale#Escape('ccls') + + let b:ale_objc_ccls_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + +Execute(The initialization options should be configurable): + AssertLSPOptions {} + + let b:ale_objc_ccls_init_options = { 'cacheDirectory': '/tmp/ccls' } + + AssertLSPOptions { 'cacheDirectory': '/tmp/ccls' } |