]> granicus.if.org Git - php/commitdiff
forked bug67052.phpt for Windows
authorAnatol Belski <ab@php.net>
Thu, 20 Nov 2014 17:29:14 +0000 (18:29 +0100)
committerAnatol Belski <ab@php.net>
Fri, 21 Nov 2014 08:53:55 +0000 (09:53 +0100)
ext/intl/tests/bug67052-win32.phpt [new file with mode: 0644]
ext/intl/tests/bug67052.phpt

diff --git a/ext/intl/tests/bug67052-win32.phpt b/ext/intl/tests/bug67052-win32.phpt
new file mode 100644 (file)
index 0000000..5bc6497
--- /dev/null
@@ -0,0 +1,30 @@
+--TEST--
+Bug #67052 - NumberFormatter::parse() resets LC_NUMERIC setting
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+  die("skip Valid only on Windows");
+}
+?>
+--FILE--
+<?php
+
+function ut_main()
+{
+        setlocale(LC_ALL, 'de-de');
+        $fmt = new NumberFormatter( 'sl_SI.UTF-8', NumberFormatter::DECIMAL);
+        $num = "1.234.567,891";
+        $res_str =  $fmt->parse($num)."\n";
+        $res_str .=  setlocale(LC_NUMERIC, 0);
+        return $res_str;
+}
+
+include_once( 'ut_common.inc' );
+ut_run();
+
+?>
+--EXPECT--
+1234567,891
+de-de
+
index c8363b9c7ac1448f52a2ae8a0d9d570907f10af4..8edd65de71df6c49e76983af77b033e43eba50a5 100644 (file)
@@ -2,6 +2,11 @@
 Bug #67052 - NumberFormatter::parse() resets LC_NUMERIC setting
 --SKIPIF--
 <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+  die("skip Valid only on non Windows");
+}
+?>
 --FILE--
 <?php