nl_langinfo test: Avoid test failure on NetBSD 5.
authorBruno Haible <bruno@clisp.org>
Thu, 21 Oct 2010 23:59:15 +0000 (01:59 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 21 Oct 2010 23:59:15 +0000 (01:59 +0200)
* tests/test-nl_langinfo.c (main): Relax test of nl_langinfo(CRNCYSTR).
Reported by Eric Blake.

ChangeLog
tests/test-nl_langinfo.c

index a265b14..1239a10 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-21  Bruno Haible  <bruno@clisp.org>
+
+       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  <eblake@redhat.com>
 
        c-stack: work around libsigsegv 2.8 bug
index 27b1ed6..41f16d3 100644 (file)
@@ -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);