From a0598ff28d2256e53968f760492c55879055ea94 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 22 Oct 2010 01:59:15 +0200 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ tests/test-nl_langinfo.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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); -- 2.11.0