]> granicus.if.org Git - php/commitdiff
Zend Engine behaviour is affected by setlocale() due to use of
authorHartmut Holzgraefe <hholzgra@php.net>
Wed, 17 Jul 2002 08:49:26 +0000 (08:49 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Wed, 17 Jul 2002 08:49:26 +0000 (08:49 +0000)
locale aware functions like strtod(), atof(), tolower(), toupper() :(

tests/lang/034.phpt [new file with mode: 0644]
tests/lang/035.phpt [new file with mode: 0644]

diff --git a/tests/lang/034.phpt b/tests/lang/034.phpt
new file mode 100644 (file)
index 0000000..2516f86
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+Locale settings affecting float parsing
+--SKIPIF--
+<?php  # try to activate a german locale
+$status = false;
+foreach(array("de_DE", "de", "german", "ge") as $lang) {
+  if($lang == setlocale("LC_ALL", $lang)) {
+         $status = true; 
+       continue;
+  }
+}
+if(!$status) print "skip";
+?>
+--POST--
+--GET--
+--FILE--
+<?php 
+# try to activate a german locale
+foreach(array("de_DE", "de", "german", "ge") as $lang) {
+  if($lang == setlocale("LC_ALL", $lang)) {
+         continue;
+  }
+}
+
+echo (float)"3.14";
+?>
+--EXPECT--
+3.14
diff --git a/tests/lang/035.phpt b/tests/lang/035.phpt
new file mode 100644 (file)
index 0000000..e02c243
--- /dev/null
@@ -0,0 +1,7 @@
+
+---- EXPECTED OUTPUT
+test_i
+test
+---- ACTUAL OUTPUT
+test_itest
+---- FAILED