Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ludviggunne committed Nov 14, 2024
1 parent b5676e8 commit 13d716b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/cli/other_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ def test_progress_j(tmpdir):
assert stdout == "Checking {} ...\n".format(test_file)
assert stderr == ""

def test_progress_proj_j(tmpdir):
args = ['--project=proj2/proj2.cppcheck', '-j2']

exitcode, stdout, stderr = cppcheck(args)

progress_lines = '\n'.join(list(filter(lambda l: not l.startswith("Checking"), stdout.split('\n'))))

assert (progress_lines ==
"1/2 files checked 76% done\n"
"2/2 files checked 100% done\n")
assert exitcode == 0

def test_execute_addon_failure(tmpdir):
test_file = os.path.join(tmpdir, 'test.cpp')
Expand Down

0 comments on commit 13d716b

Please sign in to comment.