[PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2008-08-21 Thread Pierre-Alain Joye
pajoye  Thu Aug 21 08:27:55 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/array   locale_sort.phpt 
  Log:
  - MFB:  skip on windows (setlocale can even crash on win+VC6...)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/locale_sort.phpt?r1=1.11r2=1.12diff_format=u
Index: php-src/ext/standard/tests/array/locale_sort.phpt
diff -u php-src/ext/standard/tests/array/locale_sort.phpt:1.11 
php-src/ext/standard/tests/array/locale_sort.phpt:1.12
--- php-src/ext/standard/tests/array/locale_sort.phpt:1.11  Mon May 26 
23:35:49 2008
+++ php-src/ext/standard/tests/array/locale_sort.phpt   Thu Aug 21 08:27:55 2008
@@ -2,6 +2,9 @@
 Sort with SORT_LOCALE_STRING
 --SKIPIF--
 ?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+  die(Unix locale name only, not available on windows (and crashes with 
VC6)\n);
+}
 if (false == setlocale(LC_CTYPE, fr_FR, fr_FR.ISO8859-1)) {
   die(skip setlocale() failed\n);
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2008-08-21 Thread Pierre-Alain Joye
pajoye  Thu Aug 21 08:30:31 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/array   locale_sort.phpt 
  Log:
  - +skip
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/locale_sort.phpt?r1=1.12r2=1.13diff_format=u
Index: php-src/ext/standard/tests/array/locale_sort.phpt
diff -u php-src/ext/standard/tests/array/locale_sort.phpt:1.12 
php-src/ext/standard/tests/array/locale_sort.phpt:1.13
--- php-src/ext/standard/tests/array/locale_sort.phpt:1.12  Thu Aug 21 
08:27:55 2008
+++ php-src/ext/standard/tests/array/locale_sort.phpt   Thu Aug 21 08:30:28 2008
@@ -3,7 +3,7 @@
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
-  die(Unix locale name only, not available on windows (and crashes with 
VC6)\n);
+  die(skip Unix locale name only, not available on windows (and crashes with 
VC6)\n);
 }
 if (false == setlocale(LC_CTYPE, fr_FR, fr_FR.ISO8859-1)) {
   die(skip setlocale() failed\n);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2008-08-21 Thread Jani Taskinen

Eh..skipping test because there's a bug that causes a crash??
Is the bug unfixable (no such thing) or what?

--Jani


Pierre-Alain Joye wrote:

pajoye  Thu Aug 21 08:30:31 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/array	locale_sort.phpt 
  Log:

  - +skip
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/locale_sort.phpt?r1=1.12r2=1.13diff_format=u

Index: php-src/ext/standard/tests/array/locale_sort.phpt
diff -u php-src/ext/standard/tests/array/locale_sort.phpt:1.12 
php-src/ext/standard/tests/array/locale_sort.phpt:1.13
--- php-src/ext/standard/tests/array/locale_sort.phpt:1.12  Thu Aug 21 
08:27:55 2008
+++ php-src/ext/standard/tests/array/locale_sort.phpt   Thu Aug 21 08:30:28 2008
@@ -3,7 +3,7 @@
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
-  die(Unix locale name only, not available on windows (and crashes with 
VC6)\n);
+  die(skip Unix locale name only, not available on windows (and crashes with 
VC6)\n);
 }
 if (false == setlocale(LC_CTYPE, fr_FR, fr_FR.ISO8859-1)) {
   die(skip setlocale() failed\n);






--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2008-08-21 Thread Pierre Joye
hi,

On Thu, Aug 21, 2008 at 10:32 AM, Jani Taskinen [EMAIL PROTECTED] wrote:
 Eh..skipping test because there's a bug that causes a crash??
 Is the bug unfixable (no such thing) or what?

This test can't work on windows because the locale name is unix only
(windows has its own locale name like french or
french.somecodepage, etc., see www.php.net/setlocale).

With VC6 CRT, It happens that calling setlocale with an invalid locale
may crash the win32's setlocale. That's not fixable as we don't
control VC6 CRT implementation. We may work around this bug by testing
if the locale is a valid one (include the windows list in php-src and
doing other horrible things like that) but I don't think it is worth
it. VC9 works like expected as it nicely fails.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2007-07-13 Thread Antony Dovgal
tony2001Fri Jul 13 17:15:13 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/array   locale_sort.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/locale_sort.phpt?r1=1.8r2=1.9diff_format=u
Index: php-src/ext/standard/tests/array/locale_sort.phpt
diff -u php-src/ext/standard/tests/array/locale_sort.phpt:1.8 
php-src/ext/standard/tests/array/locale_sort.phpt:1.9
--- php-src/ext/standard/tests/array/locale_sort.phpt:1.8   Tue Jul 10 
15:19:13 2007
+++ php-src/ext/standard/tests/array/locale_sort.phpt   Fri Jul 13 17:15:12 2007
@@ -57,7 +57,8 @@
   [NT]=
   string(25) Territoires du Nord-Ouest
 }
---UEXPECT--
+--UEXPECTF--
+Strict Standards: setlocale(): deprecated in Unicode mode, please use ICU 
locale functions in %s on line %d
 array(13) {
   [uAB]=
   unicode(7) Alberta

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2007-07-10 Thread Dmitry Stogov
dmitry  Tue Jul 10 15:19:13 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/array   locale_sort.phpt 
  Log:
  Fixed test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/locale_sort.phpt?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/standard/tests/array/locale_sort.phpt
diff -u php-src/ext/standard/tests/array/locale_sort.phpt:1.7 
php-src/ext/standard/tests/array/locale_sort.phpt:1.8
--- php-src/ext/standard/tests/array/locale_sort.phpt:1.7   Fri Dec 22 
01:20:24 2006
+++ php-src/ext/standard/tests/array/locale_sort.phpt   Tue Jul 10 15:19:13 2007
@@ -2,29 +2,25 @@
 Sort with SORT_LOCALE_STRING
 --SKIPIF--
 ?php
-if (false == @setlocale(LC_CTYPE, fr_FR, fr_FR.UTF-8)) {
+if (false == setlocale(LC_CTYPE, fr_FR, fr_FR.ISO8859-1)) {
   die(skip setlocale() failed\n);
 }
-if (!function_exists(locale_set_default)) {
-  die(sip locale_set_default() function\n);
-}
 ?
 --INI--
-unicode.script_encoding=UTF-8
-unicode.output_encoding=UTF-8
+unicode.script_encoding=ISO8859-1
+unicode.output_encoding=ISO8859-1
 --FILE--
 ?php
[EMAIL PROTECTED](LC_ALL, 'fr_FR', 'fr_FR.UTF-8');
-locale_set_default('fr_FR');
+setlocale(LC_ALL, 'fr_FR', 'fr_FR.ISO8859-1');
 $table = array(AB = Alberta,
 BC = Colombie-Britannique,
 MB = Manitoba,
 NB = Nouveau-Brunswick,
 NL = Terre-Neuve-et-Labrador,
-NS = Nouvelle-Écosse,
+NS = Nouvelle-Écosse,
 ON = Ontario,
-PE = Île-du-Prince-Édouard,
-QC = Québec,
+PE = Île-du-Prince-Édouard,
+QC = Québec,
 SK = Saskatchewan,
 NT = Territoires du Nord-Ouest,
 NU = Nunavut,
@@ -39,19 +35,19 @@
   [BC]=
   string(20) Colombie-Britannique
   [PE]=
-  string(21) Île-du-Prince-Édouard
+  string(21) Île-du-Prince-Édouard
   [MB]=
   string(8) Manitoba
   [NB]=
   string(17) Nouveau-Brunswick
   [NS]=
-  string(15) Nouvelle-Écosse
+  string(15) Nouvelle-Écosse
   [NU]=
   string(7) Nunavut
   [ON]=
   string(7) Ontario
   [QC]=
-  string(6) Québec
+  string(6) Québec
   [SK]=
   string(12) Saskatchewan
   [NL]=
@@ -68,19 +64,19 @@
   [uBC]=
   unicode(20) Colombie-Britannique
   [uPE]=
-  unicode(21) Île-du-Prince-Édouard
+  unicode(21) Île-du-Prince-Édouard
   [uMB]=
   unicode(8) Manitoba
   [uNB]=
   unicode(17) Nouveau-Brunswick
   [uNS]=
-  unicode(15) Nouvelle-Écosse
+  unicode(15) Nouvelle-Écosse
   [uNU]=
   unicode(7) Nunavut
   [uON]=
   unicode(7) Ontario
   [uQC]=
-  unicode(6) Québec
+  unicode(6) Québec
   [uSK]=
   unicode(12) Saskatchewan
   [uNL]=

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2006-10-08 Thread Hannes Magnusson
bjori   Sun Oct  8 20:06:05 2006 UTC

  Modified files:  
/php-src/ext/standard/tests/array   locale_sort.phpt 
  Log:
  Fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/locale_sort.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/standard/tests/array/locale_sort.phpt
diff -u php-src/ext/standard/tests/array/locale_sort.phpt:1.5 
php-src/ext/standard/tests/array/locale_sort.phpt:1.6
--- php-src/ext/standard/tests/array/locale_sort.phpt:1.5   Fri Jan  6 
21:21:09 2006
+++ php-src/ext/standard/tests/array/locale_sort.phpt   Sun Oct  8 20:06:04 2006
@@ -5,8 +5,8 @@
 if (fr_FR != setlocale(LC_CTYPE, fr_FR)) {
   die(skip setlocale() failed\n);
 }
-if (!function_exists(i18n_loc_set_default)) {
-  die(skip no i18n_loc_set_default() function\n);
+if (!function_exists(locale_set_default)) {
+  die(sip locale_set_default() function\n);
 }
 ?
 --INI--
@@ -15,7 +15,7 @@
 --FILE--
 ?php
 setlocale(LC_ALL, 'fr_FR');
-i18n_loc_set_default('fr_FR');
+locale_set_default('fr_FR');
 $table = array(AB = Alberta,
 BC = Colombie-Britannique,
 MB = Manitoba,

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2005-03-22 Thread Jani Taskinen
sniper  Tue Mar 22 10:38:26 2005 EDT

  Added files: 
/php-src/ext/standard/tests/array   locale_sort.phpt 
  Log:
  Addded test for locale aware sort
  

http://cvs.php.net/co.php/php-src/ext/standard/tests/array/locale_sort.phpt?r=1.1p=1
Index: php-src/ext/standard/tests/array/locale_sort.phpt
+++ php-src/ext/standard/tests/array/locale_sort.phpt
--TEST--
Sort with SORT_LOCALE_STRING
--FILE--
?php
setlocale(LC_ALL, 'fr_FR');
$table = array(AB = Alberta,
BC = Colombie-Britannique,
MB = Manitoba,
NB = Nouveau-Brunswick,
NL = Terre-Neuve-et-Labrador,
NS = Nouvelle-Écosse,
ON = Ontario,
PE = Île-du-Prince-Édouard,
QC = Québec,
SK = Saskatchewan,
NT = Territoires du Nord-Ouest,
NU = Nunavut,
YT = Territoire du Yukon);
asort($table, SORT_LOCALE_STRING);
var_dump($table);
?
--EXPECT--
array(13) {
  [AB]=
  string(7) Alberta
  [BC]=
  string(20) Colombie-Britannique
  [PE]=
  string(21) Île-du-Prince-Édouard
  [MB]=
  string(8) Manitoba
  [NB]=
  string(17) Nouveau-Brunswick
  [NS]=
  string(15) Nouvelle-Écosse
  [NU]=
  string(7) Nunavut
  [ON]=
  string(7) Ontario
  [QC]=
  string(6) Québec
  [SK]=
  string(12) Saskatchewan
  [NL]=
  string(23) Terre-Neuve-et-Labrador
  [YT]=
  string(19) Territoire du Yukon
  [NT]=
  string(25) Territoires du Nord-Ouest
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2005-03-22 Thread Jani Taskinen
sniper  Tue Mar 22 11:03:11 2005 EDT

  Modified files:  
/php-src/ext/standard/tests/array   locale_sort.phpt 
  Log:
  Added SKIPIF
  
http://cvs.php.net/diff.php/php-src/ext/standard/tests/array/locale_sort.phpt?r1=1.1r2=1.2ty=u
Index: php-src/ext/standard/tests/array/locale_sort.phpt
diff -u php-src/ext/standard/tests/array/locale_sort.phpt:1.1 
php-src/ext/standard/tests/array/locale_sort.phpt:1.2
--- php-src/ext/standard/tests/array/locale_sort.phpt:1.1   Tue Mar 22 
10:38:25 2005
+++ php-src/ext/standard/tests/array/locale_sort.phpt   Tue Mar 22 11:03:10 2005
@@ -1,5 +1,11 @@
 --TEST--
 Sort with SORT_LOCALE_STRING
+--SKIPIF--
+?php
+if (fr_FR != setlocale(LC_CTYPE, fr_FR)) {
+  die(skip setlocale() failed\n);
+}
+?
 --FILE--
 ?php
 setlocale(LC_ALL, 'fr_FR');

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php