Ed Maste wrote: > On 30 September 2012 17:39, Bruno Haible <br...@clisp.org> wrote: >> Jim Meyering wrote on 2012-08-28: >>> FAIL: test-localeconv (exit: 262) >>> ================================= >>> >>> test-localeconv.c:41: assertion failed >>> >>> which corresponds to this line: >>> >>> $ cat -n tests/test-localeconv.c|grep -B6 41 >>> 35 { >>> 36 struct lconv *l = localeconv (); >>> 37 >>> 38 ASSERT (STREQ (l->decimal_point, ".")); >>> 39 ASSERT (STREQ (l->thousands_sep, "")); >>> 40 #if !defined __FreeBSD__ >>> 41 ASSERT (STREQ (l->grouping, "")); >>> >> >> It's easy to work around the failure. Since that particular test >> is already exempted on FreeBSD, it's not a big deal to also disable >> it on Solaris 11. > > For FreeBSD specifically I'd rather conclude either that this is a bug > in our localeconv and fix it, or that more than one value for > l->grouping is permissible and change the test. I've raised a FreeBSD > pr for this: http://www.freebsd.org/cgi/query-pr.cgi?pr=172215 since > it looks to me like the most recent standards suggest grouping should > be "" rather than "\177". > > That said, the test passes for me with the following change:
Thanks for the patch! Dare I ask? ;-) Did you try it on Solaris 11? If not, I will get to it. > --- a/tests/test-localeconv.c > +++ b/tests/test-localeconv.c > @@ -37,15 +37,11 @@ main () > > ASSERT (STREQ (l->decimal_point, ".")); > ASSERT (STREQ (l->thousands_sep, "")); > -#if !(defined __FreeBSD__ || defined __sun) > - ASSERT (STREQ (l->grouping, "")); > -#endif > + ASSERT (l->grouping[0] == CHAR_MAX || STREQ (l->grouping, "")); > > ASSERT (STREQ (l->mon_decimal_point, "")); > ASSERT (STREQ (l->mon_thousands_sep, "")); > -#if !(defined __FreeBSD__ || defined __sun) > - ASSERT (STREQ (l->mon_grouping, "")); > -#endif > + ASSERT (l->mon_grouping[0] == CHAR_MAX || STREQ (l->mon_grouping, "")); > ASSERT (STREQ (l->positive_sign, "")); > ASSERT (STREQ (l->negative_sign, "")); > > -Ed