Skip to content

Commit 65af641

Browse files
committed
add python test
1 parent a9f76b7 commit 65af641

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

test/cli/more-projects_test.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,4 +896,23 @@ def test_project_file_nested(tmp_path):
896896
'cppcheck: error: nested Cppcheck GUI projects are not supported.'
897897
]
898898

899-
assert_cppcheck(args, ec_exp=1, err_exp=[], out_exp=out_lines)
899+
assert_cppcheck(args, ec_exp=1, err_exp=[], out_exp=out_lines)
900+
901+
def test_project_file_no_analyze_all_vs_configs(tmp_path):
902+
test_file = tmp_path / 'test.c'
903+
with open(test_file, 'wt'):
904+
pass
905+
906+
project_path = tmp_path / 'project.cppcheck'
907+
with open(project_path, 'wt') as f:
908+
f.write(
909+
"""<project>
910+
<analyze-all-vs-configs>false</analyze-all-vs-configs>
911+
<paths>
912+
<dir name="{}"/>
913+
</paths>
914+
</project>""".format(test_file))
915+
916+
ret, stdout, stderr = cppcheck(['--project=' + str(project_path)])
917+
assert ret == 0, stdout
918+
assert stderr == ''

0 commit comments

Comments
 (0)