summaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2002-07-17 08:49:26 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2002-07-17 08:49:26 +0000
commit40007c204966959e485cf712691eaeb92680f5ff (patch)
treef688a88d6f20bf28444fe96d1473c03b7338e89f /tests/lang
parent9ae8c39bab286ac551abdf7952c1b031291c6795 (diff)
downloadphp-git-40007c204966959e485cf712691eaeb92680f5ff.tar.gz
Zend Engine behaviour is affected by setlocale() due to use of
locale aware functions like strtod(), atof(), tolower(), toupper() :(
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/034.phpt28
-rw-r--r--tests/lang/035.phpt7
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/lang/034.phpt b/tests/lang/034.phpt
new file mode 100644
index 0000000000..2516f8604c
--- /dev/null
+++ b/tests/lang/034.phpt
@@ -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
index 0000000000..e02c243b39
--- /dev/null
+++ b/tests/lang/035.phpt
@@ -0,0 +1,7 @@
+
+---- EXPECTED OUTPUT
+test_i
+test
+---- ACTUAL OUTPUT
+test_itest
+---- FAILED