summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkeramida <keramida@FreeBSD.org>2004-10-13 22:32:12 +0000
committerkeramida <keramida@FreeBSD.org>2004-10-13 22:32:12 +0000
commit2eb8bfd3163ecccebe0ece7e2748023d17cb8673 (patch)
tree6bde8ee2b81cfc77d99f380101a8280c8cf9fda6 /tools
parent3563cef59745437cb37d2bc00de62f2b9fd5e84e (diff)
downloadFreeBSD-src-2eb8bfd3163ecccebe0ece7e2748023d17cb8673.zip
FreeBSD-src-2eb8bfd3163ecccebe0ece7e2748023d17cb8673.tar.gz
Add a regression test for floating-point output in the Greek locale.
See revision 1.3 of src/share/numericdef/el_GR.ISO8859-7.src Reviewed by: das (a while ago)
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/lib/libc/stdio/test-printfloat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/regression/lib/libc/stdio/test-printfloat.c b/tools/regression/lib/libc/stdio/test-printfloat.c
index ab4d502..3aa73e8 100644
--- a/tools/regression/lib/libc/stdio/test-printfloat.c
+++ b/tools/regression/lib/libc/stdio/test-printfloat.c
@@ -111,8 +111,15 @@ main(int argc, char *argv[])
testfmt("00123,456,78.0625", "%'017.4F", 12345678.0625);
testfmt(" 90,00", "%'6.0f", 9000.0);
testfmt("90,00.0", "%'.1f", 9000.0);
+
assert(setlocale(LC_NUMERIC, "ru_RU.ISO8859-5")); /* decimalpoint==, */
testfmt("3,1415", "%g", 3.1415);
+
+ /* thousands=. decimalpoint=, grouping=3;3 */
+ assert(setlocale(LC_NUMERIC, "el_GR.ISO8859-7")); /* decimalpoint==, */
+ testfmt("1.234,00", "%'.2f", 1234.00);
+ testfmt("123.456,789", "%'.3f", 123456.789);
+
assert(setlocale(LC_NUMERIC, ""));
testfmt("12345678.062500", "%'f", 12345678.0625);
testfmt("9000.000000", "%'f", 9000.0);
OpenPOWER on IntegriCloud