From 8d029ebf21ac5b3503840718f5d4838b9fbaf016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Sun, 8 Oct 2023 23:29:49 +0200 Subject: [PATCH] fix --- tests/Console/Command/DiffTest.php | 19 ++++++++++++++++++- tests/Console/Command/InfoTest.php | 3 +-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tests/Console/Command/DiffTest.php b/tests/Console/Command/DiffTest.php index 000dca0c1..9eb3f6c97 100644 --- a/tests/Console/Command/DiffTest.php +++ b/tests/Console/Command/DiffTest.php @@ -19,6 +19,7 @@ use Fidry\Console\ExitCode; use InvalidArgumentException; use KevinGH\Box\Phar\InvalidPhar; +use KevinGH\Box\Platform; use KevinGH\Box\Test\CommandTestCase; use KevinGH\Box\Test\RequiresPharReadonlyOff; use Symfony\Component\Console\Output\OutputInterface; @@ -599,7 +600,8 @@ static function (CommandTester $commandTester): string { return DisplayNormalizer::removeTrailingSpaces($commandTester->getDisplay(true)); }, - <<<'OUTPUT' + Platform::isOSX() + ? <<<'OUTPUT' // Comparing the two archives... (do not check the signatures) @@ -613,6 +615,21 @@ static function (CommandTester $commandTester): string { --- > echo 'Hello world!'; + OUTPUT + : <<<'OUTPUT' + + // Comparing the two archives... (do not check the signatures) + + [OK] The two archives are identical + + // Comparing the two archives contents... + + diff '--exclude=.phar_meta.json' simple-phar-bar.phar/bar.php simple-phar-baz.phar/bar.php + 3c3 + < echo "Hello world!"; + --- + > echo 'Hello world!'; + OUTPUT, 1, ])(); diff --git a/tests/Console/Command/InfoTest.php b/tests/Console/Command/InfoTest.php index 31b9cbdc2..aac771ed3 100644 --- a/tests/Console/Command/InfoTest.php +++ b/tests/Console/Command/InfoTest.php @@ -26,7 +26,6 @@ use function implode; use function preg_replace; use function realpath; -use const PHP_OS_FAMILY; /** * @covers \KevinGH\Box\Console\Command\Info @@ -46,7 +45,7 @@ class InfoTest extends CommandTestCase protected function setUp(): void { - if (PHP_OS_FAMILY !== 'Darwin') { + if (!Platform::isOSX()) { self::markTestSkipped('This test requires more work to be working fine cross-platform.'); }