xref: /php-src/tests/lang/bug30638.phpt (revision 60189aa9)
1--TEST--
2Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X)
3--SKIPIF--
4<?php
5if (setlocale(LC_ALL, 'invalid') === 'invalid') { die('skip setlocale() is broken /w musl'); }
6# try to activate a german locale
7if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
8    print "skip setlocale() failed";
9} elseif (strtolower(php_uname('s')) == 'darwin') {
10    print "skip ok to fail on MacOS X";
11}
12?>
13--FILE--
14<?php
15# activate the german locale
16setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1");
17
18$lc = localeconv();
19printf("decimal_point: %s\n", $lc['decimal_point']);
20printf("thousands_sep: %s\n", $lc['thousands_sep']);
21?>
22--EXPECT--
23decimal_point: ,
24thousands_sep: .
25