Annotation of embedaddon/php/ext/intl/tests/bug14562.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #14562 NumberFormatter breaks when locale changes
! 3: --SKIPIF--
! 4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: function ut_main()
! 9: {
! 10: $res_str = "";
! 11: $de_locale="de_DE.UTF-8";
! 12: $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL );
! 13: $numeric = $fmt->parse("1234,56");
! 14: $res_str .= "$numeric\n";
! 15: setlocale(LC_ALL, $de_locale);
! 16: $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL );
! 17: $numeric = $fmt->parse("1234,56");
! 18: $res_str .= "$numeric\n";
! 19: return $res_str;
! 20: }
! 21:
! 22: include_once( 'ut_common.inc' );
! 23: ut_run();
! 24:
! 25: ?>
! 26: --EXPECT--
! 27: 1234.56
! 28: 1234.56
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>