diff options
author | Stanislav Malyshev <stas@php.net> | 2009-01-30 20:56:12 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2009-01-30 20:56:12 +0000 |
commit | 54216edfe34ce7e263f2e3904b5f8ed99e9ce707 (patch) | |
tree | 62644e704567efa01e0b9f489abfc987ef08788c /ext/intl/tests/bug14562.phpt | |
parent | d295d9113e2c6e411261a38c50ee0f25ba57571f (diff) | |
download | php-git-54216edfe34ce7e263f2e3904b5f8ed99e9ce707.tar.gz |
fix bug #14562
Diffstat (limited to 'ext/intl/tests/bug14562.phpt')
-rwxr-xr-x | ext/intl/tests/bug14562.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/intl/tests/bug14562.phpt b/ext/intl/tests/bug14562.phpt new file mode 100755 index 0000000000..3256268405 --- /dev/null +++ b/ext/intl/tests/bug14562.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #14562 NumberFormatter breaks when locale changes +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +--FILE-- +<?php + +function ut_main() +{ + $res_str = ""; + $de_locale="de_DE.UTF-8"; + $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL ); + $numeric = $fmt->parse("1234,56"); + $res_str .= "$numeric\n"; + setlocale(LC_ALL, $de_locale); + $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL ); + $numeric = $fmt->parse("1234,56"); + $res_str .= "$numeric\n"; + return $res_str; +} + +include_once( 'ut_common.inc' ); +ut_run(); + +?> +--EXPECT-- +1234.56 +1234.56 |