From: Bruno Haible Date: Thu, 21 Oct 2010 23:59:15 +0000 (+0200) Subject: nl_langinfo test: Avoid test failure on NetBSD 5. X-Git-Tag: v0.1~3668 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=a0598ff28d2256e53968f760492c55879055ea94;p=gnulib.git nl_langinfo test: Avoid test failure on NetBSD 5. * tests/test-nl_langinfo.c (main): Relax test of nl_langinfo(CRNCYSTR). Reported by Eric Blake. --- diff --git a/ChangeLog b/ChangeLog index a265b14bd..1239a1092 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-21 Bruno Haible + + nl_langinfo test: Avoid test failure on NetBSD 5. + * tests/test-nl_langinfo.c (main): Relax test of nl_langinfo(CRNCYSTR). + Reported by Eric Blake. + 2010-10-21 Eric Blake c-stack: work around libsigsegv 2.8 bug diff --git a/tests/test-nl_langinfo.c b/tests/test-nl_langinfo.c index 27b1ed668..41f16d39b 100644 --- a/tests/test-nl_langinfo.c +++ b/tests/test-nl_langinfo.c @@ -112,7 +112,11 @@ main (int argc, char *argv[]) /* nl_langinfo items of the LC_MONETARY category */ { const char *currency = nl_langinfo (CRNCYSTR); - ASSERT (strlen (currency) >= (pass > 0 ? 1 : 0)); + ASSERT (strlen (currency) >= 0); +#if !defined __NetBSD__ + if (pass > 0) + ASSERT (strlen (currency) >= 1); +#endif } /* nl_langinfo items of the LC_MESSAGES category */ ASSERT (strlen (nl_langinfo (YESEXPR)) > 0);