summaryrefslogtreecommitdiff
path: root/test/command_callback/test_c_cppcheck_command_callbacks.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-05-20 22:08:03 +0100
committerw0rp <devw0rp@gmail.com>2019-05-20 22:08:03 +0100
commit28819eedd39f0746c94a1ec59ca3c089e35971a5 (patch)
tree2c51801dd80b97202add177d9fa4784eea75ed72 /test/command_callback/test_c_cppcheck_command_callbacks.vader
parent937138dad4910e2746abcf34c9d0dc4ffb5454f3 (diff)
downloadale-28819eedd39f0746c94a1ec59ca3c089e35971a5.zip
Close #2359 - Find compile_commands.json in build dirs for cppcheck
Diffstat (limited to 'test/command_callback/test_c_cppcheck_command_callbacks.vader')
-rw-r--r--test/command_callback/test_c_cppcheck_command_callbacks.vader14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/command_callback/test_c_cppcheck_command_callbacks.vader b/test/command_callback/test_c_cppcheck_command_callbacks.vader
index 3ae4bdbe..8e11ef2d 100644
--- a/test/command_callback/test_c_cppcheck_command_callbacks.vader
+++ b/test/command_callback/test_c_cppcheck_command_callbacks.vader
@@ -21,4 +21,16 @@ Execute(cppcheck for C++ should detect compile_commands.json files):
AssertLinter 'cppcheck',
\ ale#path#CdString(ale#path#Simplify(g:dir . '/cppcheck_paths/one'))
\ . ale#Escape('cppcheck')
- \ . ' -q --language=c --project=compile_commands.json --enable=style %t'
+ \ . ' -q --language=c'
+ \ . ' --project=' . ale#Escape('compile_commands.json')
+ \ . ' --enable=style %t'
+
+Execute(cppcheck for C++ should detect compile_commands.json files in build directories):
+ call ale#test#SetFilename('cppcheck_paths/with_build_dir/foo.cpp')
+
+ AssertLinter 'cppcheck',
+ \ ale#path#CdString(ale#path#Simplify(g:dir . '/cppcheck_paths/with_build_dir'))
+ \ . ale#Escape('cppcheck')
+ \ . ' -q --language=c'
+ \ . ' --project=' . ale#Escape(ale#path#Simplify('build/compile_commands.json'))
+ \ . ' --enable=style %t'