Skip to content

Commit

Permalink
Improve progress bar output matching algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
aik099 committed Mar 23, 2024
1 parent 3b4351c commit 70fc53a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/SVNBuddy/ProphecyToken/ProgressBarOutputToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ protected function normalize($text)
$ret = $text;

// Ignore the unlimited progress bar on PHP 5.6.
if ( \PHP_VERSION_ID < 70000 ) {
/*if ( \PHP_VERSION_ID < 70000 ) {
$ret = preg_replace('/\[[>-]+\]/', '[----------------------------]', $ret);
}
}*/

// Ignore memory consumption, because it might vary on different PHP versions.
$ret = preg_replace('#<info>\d+\.\d+ MiB\s+</info>#', '<info>0.0 MiB</info>', $ret);

// Ignore time consumption, because it might vary on different PHP versions.
$ret = preg_replace('/(<\s+)?\d+(\.\d+)? (sec|min)(s)?([\s]+)?/', '5 min', $ret);
$ret = preg_replace('/([\s]+)?(<\s+)?\d+(\.\d+)? (sec|min)(s)?([\s]+)?/', '5 min', $ret);

return $ret;
}
Expand Down

0 comments on commit 70fc53a

Please sign in to comment.