test-getaddrinfo: skip (don't fail) this test when there's no network
[gnulib.git] / tests / test-strerror.c
index 036ce45..3d9814d 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of strerror() function.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007-2008 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,6 +30,7 @@
       if (!(expr))                                                          \
         {                                                                   \
           fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+          fflush (stderr);                                                  \
           abort ();                                                         \
         }                                                                   \
     }                                                                       \
@@ -39,10 +40,19 @@ int
 main (int argc, char **argv)
 {
   char *str;
+
   str = strerror (EACCES);
   ASSERT (str);
   ASSERT (*str);
 
+  str = strerror (ETIMEDOUT);
+  ASSERT (str);
+  ASSERT (*str);
+
+  str = strerror (EOVERFLOW);
+  ASSERT (str);
+  ASSERT (*str);
+
   str = strerror (0);
   ASSERT (str);
   ASSERT (*str);