readlink, areadlink: Relax test a bit.
[gnulib.git] / tests / test-areadlink.h
index 1da2e1b..9ad8019 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of areadlink and friends.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010 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
@@ -49,14 +49,14 @@ test_areadlink (char * (*func) (char const *, size_t), bool print)
   ASSERT (errno == EINVAL);
   errno = 0;
   ASSERT (func (BASE "file/", 1) == NULL);
-  ASSERT (errno == ENOTDIR);
+  ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
   ASSERT (unlink (BASE "file") == 0);
 
   /* Now test actual symlinks.  */
   if (symlink (BASE "dir", BASE "link"))
     {
       if (print)
-        fputs ("skipping test: symlinks not supported on this filesystem\n",
+        fputs ("skipping test: symlinks not supported on this file system\n",
                stderr);
       return 77;
     }
@@ -66,7 +66,6 @@ test_areadlink (char * (*func) (char const *, size_t), bool print)
   ASSERT (errno == EINVAL);
   {
     /* Too small a guess is okay.  */
-    size_t len = strlen (BASE "dir");
     char *buf = func (BASE "link", 1);
     ASSERT (buf);
     ASSERT (strcmp (buf, BASE "dir") == 0);