File tree 2 files changed +29
-5
lines changed
2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -146,19 +146,26 @@ public static function removeIntermediateNonFixedProgressBars(
146
146
$ itemsCount ,
147
147
);
148
148
149
+ // Remove intermediate lines
149
150
$ output = preg_replace (
150
151
'#\s+\d+ \[[->]+?\] .+?MiB \\n# ' ,
151
152
'' ,
152
153
$ output ,
153
154
);
154
-
155
155
$ output = preg_replace (
156
156
'#\s+\d+ \[[->]+?\] .+?MiB# ' ,
157
157
'' ,
158
158
$ output ,
159
159
);
160
160
161
- return $ restoreFirstLine ($ restoreLastLine ($ output ));
161
+ $ output = $ restoreFirstLine ($ restoreLastLine ($ output ));
162
+
163
+ // Normalize last line
164
+ return preg_replace (
165
+ '#(\s+ ' .$ itemsCount .' )\[[->]+?\]( .+?MiB)# ' ,
166
+ '$1[----->----------------------]$2 ' ,
167
+ $ output ,
168
+ );
162
169
}
163
170
164
171
/**
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ public static function nonFixedSizedProgressBarsProvider(): iterable
343
343
<<<'TXT'
344
344
345
345
0 [>---------------------------] < 1 sec 8.0 MiB
346
- 12 [------ ----------------------] 142 secs 112.0 MiB
346
+ 12 [-----> ----------------------] 142 secs 112.0 MiB
347
347
348
348
TXT,
349
349
];
@@ -363,7 +363,7 @@ public static function nonFixedSizedProgressBarsProvider(): iterable
363
363
<<<'TXT'
364
364
365
365
0 [>---------------------------] < 1 sec 8.0 MiB
366
- 12 [> ---------------------------] 142 secs 112.0 MiB
366
+ 12 [-----> ----------------------] 142 secs 112.0 MiB
367
367
368
368
TXT,
369
369
];
@@ -383,7 +383,7 @@ public static function nonFixedSizedProgressBarsProvider(): iterable
383
383
<<<'TXT'
384
384
385
385
0 [>---------------------------] < 1 sec 8.0 MiB
386
- 12 [------------> ---------------] 142 secs 112.0 MiB
386
+ 12 [-----> ----------------------] 142 secs 112.0 MiB
387
387
388
388
TXT,
389
389
];
@@ -405,6 +405,23 @@ public static function nonFixedSizedProgressBarsProvider(): iterable
405
405
406
406
TXT,
407
407
];
408
+
409
+ // https://github.com/webmozarts/console-parallelization/actions/runs/3418534317/jobs/5690951308
410
+ yield 'final step at a random stage ' => [
411
+ <<<'TXT'
412
+
413
+ 0 [>---------------------------] 10 secs 10.0 MiB
414
+ 5 [------->--------------------] 10 secs 10.0 MiB
415
+
416
+ TXT,
417
+ 5 ,
418
+ <<<'TXT'
419
+
420
+ 0 [>---------------------------] 10 secs 10.0 MiB
421
+ 5 [----->----------------------] 10 secs 10.0 MiB
422
+
423
+ TXT,
424
+ ];
408
425
}
409
426
410
427
/**
You can’t perform that action at this time.
0 commit comments