fix a bunch of SKIPIF (check for non available locales)

This commit is contained in:
Nuno Lopes 2008-01-27 16:45:43 +00:00
parent 2e58beee96
commit d16f4cad0a
8 changed files with 25 additions and 0 deletions

View File

@ -5,6 +5,10 @@ money_format test
if (!function_exists('money_format') || !function_exists('setlocale')) {
die("SKIP money_format - not supported\n");
}
if (setlocale(LC_MONETARY, 'en_US') == false) {
die('skip en_US locale not available');
}
?>
--FILE--
<?php

View File

@ -5,6 +5,9 @@ Test setlocale() function : basic functionality - setting system locale to a spe
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
if (setlocale(LC_ALL, "en_US.utf8", "en_AU.utf8", "ko_KR.utf8", "zh_CN.utf8", "de_DE.utf8", "es_EC.utf8", "fr_FR.utf8", "ja_JP.utf8", "el_GR.utf8", "nl_NL.utf8") === false) {
die('skip available locales not usable');
}
?>
--FILE--
<?php

View File

@ -5,6 +5,9 @@ Test setlocale() function : basic functionality - set locale using an array
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
if (setlocale(LC_ALL, "en_US.utf8", "en_AU.utf8", "ko_KR.utf8", "zh_CN.utf8", "de_DE.utf8", "es_EC.utf8", "fr_FR.utf8", "ja_JP.utf8", "el_GR.utf8", "nl_NL.utf8") === false) {
die('skip available locales not usable');
}
?>
--FILE--
<?php

View File

@ -5,6 +5,9 @@ Test setlocale() function : basic functionality - passing multiple locales as ar
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
if (setlocale(LC_ALL, "en_US.utf8", "Ko_KR.utf8", "zh_CN.utf8") === false) {
die('skip en_US.utf8/Ko_KR.utf8/zh_CN.utf8 locales not available');
}
?>
--FILE--
<?php

View File

@ -5,6 +5,9 @@ Test setlocale() function : usage variations - passing multiple valid/invlaid lo
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
if (setlocale(LC_ALL, "en_US.utf8", "Ko_KR.utf8", "zh_CN.utf8") === false) {
die('skip en_US.utf8/Ko_KR.utf8/zh_CN.utf8 locales not available');
}
?>
--FILE--
<?php

View File

@ -5,6 +5,9 @@ Test setlocale() function : usage variations - setting system locale = 0
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
if (setlocale(LC_ALL,'en_US.utf8') === false) {
die('skip en_US.utf8 locale not available');
}
?>
--FILE--
<?php

View File

@ -5,6 +5,9 @@ Test setlocale() function : usage variations - setting system locale as null
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
if (setlocale(LC_ALL,'en_US.utf8') === false || setlocale(LC_ALL,'en_AU.utf8') === false) {
die('skip en_US.utf8/en_AU.utf8 locales not available');
}
?>
--ENV--
LC_ALL=en_US.utf8;

View File

@ -5,6 +5,9 @@ Test setlocale() function : usage variations - Setting system locale as empty st
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for windows');
}
if (setlocale(LC_ALL,'en_AU.utf8') === false || setlocale(LC_ALL,'en_US.utf8') === false) {
die('skip en_AU.utf8/en_US.utf8 locales not available');
}
?>
--ENV--
LC_ALL=en_US.utf8;