diff options
author | Greg Anders <greg@gpanders.com> | 2019-10-06 10:29:23 -0600 |
---|---|---|
committer | Greg Anders <greg@gpanders.com> | 2019-10-06 10:29:23 -0600 |
commit | 779589884164552442cab8ab077fa37afc7317fd (patch) | |
tree | a6c9e256961f469fdeeaa8b5fb4ccfa0be81560b /test/command_callback | |
parent | 06a97a854191b331b6ec37ef7ea0c59f671b1101 (diff) | |
download | ale-779589884164552442cab8ab077fa37afc7317fd.zip |
Add tests for clangtidy with Makefile
Diffstat (limited to 'test/command_callback')
3 files changed, 27 insertions, 0 deletions
diff --git a/test/command_callback/test_c_clang_tidy_command_callback.vader b/test/command_callback/test_c_clang_tidy_command_callback.vader index fa76c66c..5ebbbd45 100644 --- a/test/command_callback/test_c_clang_tidy_command_callback.vader +++ b/test/command_callback/test_c_clang_tidy_command_callback.vader @@ -1,4 +1,7 @@ Before: + Save g:ale_c_parse_makefile + let g:ale_c_parse_makefile = 0 + call ale#assert#SetUpLinterTest('c', 'clangtidy') call ale#test#SetFilename('test.c') diff --git a/test/command_callback/test_c_import_paths.vader b/test/command_callback/test_c_import_paths.vader index 6c616d89..e6102998 100644 --- a/test/command_callback/test_c_import_paths.vader +++ b/test/command_callback/test_c_import_paths.vader @@ -121,6 +121,16 @@ Execute(The C Clang handler should include root directories for projects with .h \ . ' -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test_c_projects/hpp_file_project')) \ . ' -' +Execute(The C ClangTidy handler should include 'include' directories for projects with a Makefile): + call ale#assert#SetUpLinterTest('c', 'clangtidy') + call ale#test#SetFilename('../test_c_projects/makefile_project/subdir/file.cpp') + let g:ale_c_clangtidy_options = '' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' %s ' + \ . '-- -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test_c_projects/makefile_project/include')) + Execute(The C++ GCC handler should include 'include' directories for projects with a Makefile): call ale#assert#SetUpLinterTest('cpp', 'gcc') call ale#test#SetFilename('../test_c_projects/makefile_project/subdir/file.cpp') @@ -225,3 +235,14 @@ Execute(The C++ ClangTidy handler should include json folders for projects with \ ale#Escape('clang-tidy') \ . ' %s ' \ . '-p ' . ale#Escape(ale#path#Simplify(g:dir . '/../test_c_projects/json_project/build')) + +Execute(The C++ ClangTidy handler should include 'include' directories for projects with a Makefile): + call ale#assert#SetUpLinterTest('cpp', 'clangtidy') + call ale#test#SetFilename('../test_c_projects/makefile_project/subdir/file.cpp') + let g:ale_cpp_clangtidy_options = '' + + AssertLinter 'clang-tidy', + \ ale#Escape('clang-tidy') + \ . ' %s ' + \ . '-- -I' . ale#Escape(ale#path#Simplify(g:dir . '/../test_c_projects/makefile_project/include')) + diff --git a/test/command_callback/test_clang_tidy_command_callback.vader b/test/command_callback/test_clang_tidy_command_callback.vader index 53ae311b..c2d18dea 100644 --- a/test/command_callback/test_clang_tidy_command_callback.vader +++ b/test/command_callback/test_clang_tidy_command_callback.vader @@ -1,4 +1,7 @@ Before: + Save g:ale_c_parse_makefile + let g:ale_c_parse_makefile = 0 + call ale#assert#SetUpLinterTest('cpp', 'clangtidy') call ale#test#SetFilename('test.cpp') |