X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-remove.c;h=15d5f2773c88320c6381e2e654b943c2b4650499;hb=409da8c2eb774db685376f350518657fe6f621be;hp=4bcc2ec2dd4567191eecb95a9eec53a86ebcb696;hpb=987e5651e8d1c5aa933c9ce88562806af4093702;p=gnulib.git diff --git a/tests/test-remove.c b/tests/test-remove.c index 4bcc2ec2d..15d5f2773 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-2011 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. */ - ASSERT (system ("rm -rf " BASE "*") == 0); + 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