X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-remove.c;h=48641321c0b24662931b1fd53be4f08940f48b0c;hb=dc6d2b5b3652b68d4c62a3875c6960a473b4eaea;hp=5428e3723d0be35743e96c38214dd66d2fa6bcd5;hpb=9c40f34443ba034ee7890ab10c369a903417765d;p=gnulib.git diff --git a/tests/test-remove.c b/tests/test-remove.c index 5428e3723..48641321c 100644 --- a/tests/test-remove.c +++ b/tests/test-remove.c @@ -1,5 +1,5 @@ /* Tests of remove. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2013 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 @@ SIGNATURE_CHECK (remove, int, (char const *)); #include #include +#include "ignore-value.h" #include "macros.h" #define BASE "test-remove.t" @@ -38,7 +39,7 @@ int main (void) { /* Remove any leftovers from a previous partial run. */ - system ("rm -rf " BASE "*"); + ignore_value (system ("rm -rf " BASE "*")); /* Setup. */ ASSERT (mkdir (BASE "dir", 0700) == 0); @@ -77,7 +78,7 @@ main (void) /* Empty directory. */ errno = 0; ASSERT (remove (BASE "dir/.//") == -1); - ASSERT (errno == EINVAL || errno == EBUSY); + ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST); ASSERT (remove (BASE "dir") == 0); /* Test symlink behavior. Specifying trailing slash should remove