diff --git a/test/cli/invalid-project/invalid-project.vcxproj b/test/cli/invalid-project/invalid-project.vcxproj new file mode 100644 index 000000000000..12114b955f2a --- /dev/null +++ b/test/cli/invalid-project/invalid-project.vcxproj @@ -0,0 +1,123 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {7319858B-261C-4F0D-B022-92BB896242DD} + invalidProjet + 10.0.16299.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + true + + + + + Level3 + Disabled + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + + + + + \ No newline at end of file diff --git a/test/cli/more-projects_test.py b/test/cli/more-projects_test.py index bc3ec616a9a1..a4c629c67423 100644 --- a/test/cli/more-projects_test.py +++ b/test/cli/more-projects_test.py @@ -636,4 +636,10 @@ def test_json_file_ignore_2(tmpdir): 'cppcheck: all paths were ignored' ] - assert_cppcheck(args, ec_exp=1, err_exp=[], out_exp=out_lines) \ No newline at end of file + assert_cppcheck(args, ec_exp=1, err_exp=[], out_exp=out_lines) + + +def test_project_missing_files(): + ret, _, stderr = cppcheck(['--template=cppcheck1', '--project=' + os.path.join('invalid-project', 'invalid-project.vcxproj')]) + assert ret == 0 + assert stderr == '[invalid-project/main.c:0]: (error) File invalid-project/main.c does not exists. Skipping file.\n' \ No newline at end of file