From 69c6204c668c6f6821d2b126f88092baf8bfc8d4 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. (cherry picked from commit a0598ff28d2256e53968f760492c55879055ea94) --- ChangeLog | 6 ++++++ tests/test-nl_langinfo.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5cec4fbf6..d8edfcaf4 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 ec89b3f75..8c146e69d 100644 --- a/tests/test-nl_langinfo.c +++ b/tests/test-nl_langinfo.c @@ -105,7 +105,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