From 2eb8bfd3163ecccebe0ece7e2748023d17cb8673 Mon Sep 17 00:00:00 2001 From: keramida Date: Wed, 13 Oct 2004 22:32:12 +0000 Subject: [PATCH] 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) --- tools/regression/lib/libc/stdio/test-printfloat.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/regression/lib/libc/stdio/test-printfloat.c b/tools/regression/lib/libc/stdio/test-printfloat.c index ab4d5025f68e..3aa73e82b6d0 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);