File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / lang / bug30638.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:14 2013 UTC (10 years, 11 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--TEST--
Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X)
--SKIPIF--
<?php  # try to activate a german locale
if (substr(PHP_OS, 0, 3) == 'WIN') {
    /* skip on windows until #63688 was fixed */
    die('skip');
}
if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
	print "skip setlocale() failed";
} elseif (strtolower(php_uname('s')) == 'darwin') {
    print "skip ok to fail on MacOS X";
}
?>
--FILE--
<?php 
# activate the german locale
setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1");

$lc = localeconv();
printf("decimal_point: %s\n", $lc['decimal_point']);
printf("thousands_sep: %s\n", $lc['thousands_sep']);
?>
--EXPECT--
decimal_point: ,
thousands_sep: .

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>