X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-copy-file.c;h=cc2a6acef6e3120c0d112cce1ff86b0996f2567c;hb=5c508f686b9a0f986ac5d941d7be237ec047aedb;hp=db8e769a66183616b8cdbf7e450c5057c73ca321;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/tests/test-copy-file.c b/tests/test-copy-file.c index db8e769a6..cc2a6acef 100644 --- a/tests/test-copy-file.c +++ b/tests/test-copy-file.c @@ -1,5 +1,5 @@ /* Test of copying of files. - Copyright (C) 2008-2010 Free Software Foundation, Inc. + Copyright (C) 2008-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 @@ -20,6 +20,8 @@ #include "copy-file.h" +#include + #include "progname.h" #include "macros.h" @@ -28,6 +30,7 @@ main (int argc, char *argv[]) { const char *file1; const char *file2; + int null_stderr; set_program_name (argv[0]); @@ -35,8 +38,12 @@ main (int argc, char *argv[]) file1 = argv[1]; file2 = argv[2]; + null_stderr = (getenv ("NO_STDERR_OUTPUT") != NULL); - copy_file_preserving (file1, file2); + if (null_stderr) + ASSERT (qcopy_file_preserving (file1, file2) == 0); + else + copy_file_preserving (file1, file2); return 0; }