|
6 | 6 | import pytest |
7 | 7 | import glob |
8 | 8 | import json |
9 | | -import re |
10 | 9 | import subprocess |
11 | 10 | import shutil |
12 | 11 |
|
@@ -1057,25 +1056,35 @@ def test_markup(tmpdir): |
1057 | 1056 | assert_cppcheck(args, ec_exp=0, err_exp=[], out_exp=out_lines) |
1058 | 1057 |
|
1059 | 1058 |
|
1060 | | -def test_progress_markup_j(tmpdir): |
| 1059 | +def test_markup_j(tmpdir): |
1061 | 1060 | test_file_1 = os.path.join(tmpdir, 'test_1.qml') |
1062 | 1061 | with open(test_file_1, 'wt'): |
1063 | 1062 | pass |
1064 | | - test_file_2 = os.path.join(tmpdir, 'test_2.qml') |
| 1063 | + test_file_2 = os.path.join(tmpdir, 'test_2.cpp') |
1065 | 1064 | with open(test_file_2, 'wt'): |
1066 | 1065 | pass |
| 1066 | + test_file_3 = os.path.join(tmpdir, 'test_3.qml') |
| 1067 | + with open(test_file_3, 'wt'): |
| 1068 | + pass |
| 1069 | + test_file_4 = os.path.join(tmpdir, 'test_4.cpp') |
| 1070 | + with open(test_file_4, 'wt'): |
| 1071 | + pass |
1067 | 1072 |
|
1068 | | - args = ['--library=qt', '-j2', test_file_1, test_file_2] |
| 1073 | + args = ['--library=qt', '-j2', test_file_1, test_file_2, test_file_3, test_file_4] |
1069 | 1074 |
|
1070 | 1075 | exitcode, stdout, stderr = cppcheck(args) |
1071 | 1076 | assert exitcode == 0, stdout if stdout else stderr |
1072 | | - file_num = 1 |
1073 | 1077 | lines = stdout.splitlines() |
| 1078 | + |
1074 | 1079 | assert sorted(lines) == [ |
1075 | | - '1/2 files checked 0% done', |
1076 | | - '2/2 files checked 0% done', |
| 1080 | + '1/4 files checked 0% done', |
| 1081 | + '2/4 files checked 0% done', |
| 1082 | + '3/4 files checked 0% done', |
| 1083 | + '4/4 files checked 0% done', |
1077 | 1084 | 'Checking {} ...'.format(test_file_1), |
1078 | | - 'Checking {} ...'.format(test_file_2) |
| 1085 | + 'Checking {} ...'.format(test_file_2), |
| 1086 | + 'Checking {} ...'.format(test_file_3), |
| 1087 | + 'Checking {} ...'.format(test_file_4) |
1079 | 1088 | ] |
1080 | 1089 | assert stderr == '' |
1081 | 1090 |
|
|
0 commit comments