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