From d5d77c1bebccc77a4092adacb525c1be04362c79 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 22 Sep 2009 08:22:29 +0000 Subject: [PATCH] Fixed test (removed "bad" locale) --- ext/standard/tests/strings/setlocale_variation2.phpt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/standard/tests/strings/setlocale_variation2.phpt b/ext/standard/tests/strings/setlocale_variation2.phpt index 98c405b709..af8739a767 100644 --- a/ext/standard/tests/strings/setlocale_variation2.phpt +++ b/ext/standard/tests/strings/setlocale_variation2.phpt @@ -18,6 +18,10 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* setlocale() to set all available locales in the system and check the success count */ echo "*** Testing setlocale() : usage variations ***\n"; +function good_locale($locale) { + return $locale !== 'tt_RU@iqtelif.UTF-8'; +} + /* Prototype : array list_system_locales( void ) * Description: To get the currently installed locle in this platform * Arguments : Nil @@ -38,8 +42,8 @@ function list_system_locales() { $system_locales = explode("\n", $all_locales); - // return all the locale found in the system - return $system_locales; + // return all the locale found in the system, except for broken one + return array_filter($system_locales, 'good_locale'); } // gather all the locales installed in the system -- 2.40.0