Make sure we set the locale to "C" when testing thousands' separator

support, rather than just "", which refers to the system default based
on the environment.
This commit is contained in:
David Schultz 2007-12-03 17:48:55 +00:00
parent d069c2b7f5
commit 8b9f0f2a42
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174228

View file

@ -53,7 +53,7 @@ main(int argc, char *argv[])
{
printf("1..11\n");
assert(setlocale(LC_NUMERIC, ""));
assert(setlocale(LC_NUMERIC, "C"));
/*
* Basic tests of decimal output functionality.
@ -144,7 +144,7 @@ main(int argc, char *argv[])
testfmt("1.234,00", "%'.2f", 1234.00);
testfmt("123.456,789", "%'.3f", 123456.789);
assert(setlocale(LC_NUMERIC, ""));
assert(setlocale(LC_NUMERIC, "C"));
testfmt("12345678.062500", "%'f", 12345678.0625);
testfmt("9000.000000", "%'f", 9000.0);