Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite2ee909

Browse files
committed
Update test fixtures.
1 parent84b88bf commite2ee909

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

‎src/Symfony/Component/Console/Helper/ProgressBar.php‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,7 @@ private function overwrite(string $message): void
465465
$message_lines =explode("\n",$message);
466466
$line_count =\count($message_lines) -$this->formatLineCount +1;
467467
foreach ($message_linesas$message_line) {
468-
if (Helper::strlen($message_line) /$this->terminal->getWidth() >1) {
469-
$line_count +=floor(Helper::strlen($message_line) /$this->terminal->getWidth());
470-
}
468+
$line_count +=floor(Helper::strlen($message_line) /$this->terminal->getWidth());
471469
}
472470
$this->output->clear($line_count);
473471
}else {

‎src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ public function testOverwriteWithSectionOutput()
337337
rewind($output->getStream());
338338
$this->assertEquals(
339339
' 0/50 [>---------------------------] 0%'.\PHP_EOL.
340-
"\x1b[1A\x1b[0J".' 1/50 [>---------------------------] 2%'.\PHP_EOL.
341-
"\x1b[1A\x1b[0J".' 2/50 [=>--------------------------] 4%'.\PHP_EOL,
340+
"\x1b[2A\x1b[0J".' 1/50 [>---------------------------] 2%'.\PHP_EOL.
341+
"\x1b[2A\x1b[0J".' 2/50 [=>--------------------------] 4%'.\PHP_EOL,
342342
stream_get_contents($output->getStream())
343343
);
344344
}
@@ -364,9 +364,9 @@ public function testOverwriteMultipleProgressBarsWithSectionOutputs()
364364
$this->assertEquals(
365365
' 0/50 [>---------------------------] 0%'.\PHP_EOL.
366366
' 0/50 [>---------------------------] 0%'.\PHP_EOL.
367-
"\x1b[1A\x1b[0J".' 1/50 [>---------------------------] 2%'.\PHP_EOL.
368367
"\x1b[2A\x1b[0J".' 1/50 [>---------------------------] 2%'.\PHP_EOL.
369-
"\x1b[1A\x1b[0J".' 1/50 [>---------------------------] 2%'.\PHP_EOL.
368+
"\x1b[2A\x1b[0J".' 1/50 [>---------------------------] 2%'.\PHP_EOL.
369+
' 1/50 [>---------------------------] 2%'.\PHP_EOL.
370370
' 1/50 [>---------------------------] 2%'.\PHP_EOL,
371371
stream_get_contents($stream->getStream())
372372
);
@@ -395,10 +395,10 @@ public function testMultipleSectionsWithCustomFormat()
395395

396396
$this->assertEquals(' 0/50 [>---------------------------] 0%'.\PHP_EOL.
397397
' 0/50 [>] 0% Fruitcake marzipan toffee. Cupcake gummi bears tart dessert ice cream chupa chups cupcake chocolate bar sesame snaps. Croissant halvah cookie jujubes powder macaroon. Fruitcake bear claw bonbon jelly beans oat cake pie muffin Fruitcake marzipan toffee.'.\PHP_EOL.
398-
"\x1b[4A\x1b[0J".' 0/50 [>] 0% Fruitcake marzipan toffee. Cupcake gummi bears tart dessert ice cream chupa chups cupcake chocolate bar sesame snaps. Croissant halvah cookie jujubes powder macaroon. Fruitcake bear claw bonbon jelly beans oat cake pie muffin Fruitcake marzipan toffee.'.\PHP_EOL.
398+
"\x1b[5A\x1b[0J".' 0/50 [>] 0% Fruitcake marzipan toffee. Cupcake gummi bears tart dessert ice cream chupa chups cupcake chocolate bar sesame snaps. Croissant halvah cookie jujubes powder macaroon. Fruitcake bear claw bonbon jelly beans oat cake pie muffin Fruitcake marzipan toffee.'.\PHP_EOL.
399399
"\x1b[3A\x1b[0J".' 1/50 [>---------------------------] 2%'.\PHP_EOL.
400400
' 0/50 [>] 0% Fruitcake marzipan toffee. Cupcake gummi bears tart dessert ice cream chupa chups cupcake chocolate bar sesame snaps. Croissant halvah cookie jujubes powder macaroon. Fruitcake bear claw bonbon jelly beans oat cake pie muffin Fruitcake marzipan toffee.'.\PHP_EOL.
401-
"\x1b[3A\x1b[0J".' 1/50 [>] 2% Fruitcake marzipan toffee. Cupcake gummi bears tart dessert ice cream chupa chups cupcake chocolate bar sesame snaps. Croissant halvah cookie jujubes powder macaroon. Fruitcake bear claw bonbon jelly beans oat cake pie muffin Fruitcake marzipan toffee.'.\PHP_EOL,
401+
"\x1b[4A\x1b[0J".' 1/50 [>] 2% Fruitcake marzipan toffee. Cupcake gummi bears tart dessert ice cream chupa chups cupcake chocolate bar sesame snaps. Croissant halvah cookie jujubes powder macaroon. Fruitcake bear claw bonbon jelly beans oat cake pie muffin Fruitcake marzipan toffee.'.\PHP_EOL,
402402
stream_get_contents($stream->getStream())
403403
);
404404
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp