From ca6d5da10f674643dce5491d5e949652bb93d4df Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 19 Jul 2024 23:34:01 +0800 Subject: [PATCH] Remove redundant files and add tests for #504 bug --- src/SPC/builder/linux/library/icu.php | 3 +++ src/SPC/builder/macos/library/icu.php | 3 +++ src/globals/ext-tests/intl.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/SPC/builder/linux/library/icu.php b/src/SPC/builder/linux/library/icu.php index cbe6007f0..05458a4e7 100644 --- a/src/SPC/builder/linux/library/icu.php +++ b/src/SPC/builder/linux/library/icu.php @@ -4,6 +4,8 @@ namespace SPC\builder\linux\library; +use SPC\store\FileSystem; + class icu extends LinuxLibraryBase { use \SPC\builder\unix\library\icu; @@ -36,5 +38,6 @@ protected function build(): void ->exec('make install'); $this->patchPkgconfPrefix(['icu-i18n.pc', 'icu-io.pc', 'icu-uc.pc'], PKGCONF_PATCH_PREFIX); + FileSystem::removeDir(BUILD_LIB_PATH . '/icu'); } } diff --git a/src/SPC/builder/macos/library/icu.php b/src/SPC/builder/macos/library/icu.php index cc207d384..d49f43f8c 100644 --- a/src/SPC/builder/macos/library/icu.php +++ b/src/SPC/builder/macos/library/icu.php @@ -4,6 +4,8 @@ namespace SPC\builder\macos\library; +use SPC\store\FileSystem; + class icu extends MacOSLibraryBase { use \SPC\builder\unix\library\icu; @@ -20,5 +22,6 @@ protected function build(): void ->exec('make install'); $this->patchPkgconfPrefix(['icu-i18n.pc', 'icu-io.pc', 'icu-uc.pc'], PKGCONF_PATCH_PREFIX); + FileSystem::removeDir(BUILD_LIB_PATH . '/icu'); } } diff --git a/src/globals/ext-tests/intl.php b/src/globals/ext-tests/intl.php index 32ccd5680..b8a90624f 100644 --- a/src/globals/ext-tests/intl.php +++ b/src/globals/ext-tests/intl.php @@ -3,3 +3,6 @@ declare(strict_types=1); assert(class_exists(NumberFormatter::class)); +assert(function_exists('locale_get_default')); +$fmt = new NumberFormatter('de-DE', NumberFormatter::DECIMAL); +assert(strval($fmt->parse('1.100')) === '1100');