From 13d716bb89e4abd619a4fdc12033f826e0584314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20Gunne=20Lindstr=C3=B6m?= Date: Thu, 14 Nov 2024 14:14:38 +0100 Subject: [PATCH] add test --- test/cli/other_test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/cli/other_test.py b/test/cli/other_test.py index 829e9f2c7d75..a5d4299b3cf5 100644 --- a/test/cli/other_test.py +++ b/test/cli/other_test.py @@ -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')