X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-closein.c;h=cf7b30a4c8101c665c6a94a554540a55e081fb44;hb=49adfaf5d36d94624790dc9754a2966a8102d2b3;hp=90214e8e253507a8a2771620eba85f3a5e636073;hpb=f664d100c1b6807491654bfdf6d90e2d9fd5b4fd;p=gnulib.git diff --git a/tests/test-closein.c b/tests/test-closein.c index 90214e8e2..cf7b30a4c 100644 --- a/tests/test-closein.c +++ b/tests/test-closein.c @@ -3,7 +3,7 @@ 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 - the Free Software Foundation; either version 2, or (at your option) + the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -23,6 +23,7 @@ #include #include +#include #include "binary-io.h" @@ -43,6 +44,9 @@ main (int argc, char **argv) unreliable on text mode input. */ SET_BINARY (0); + if (argc > 2) + close (0); + if (argc > 1) i = fread (buf, 1, 6, stdin); return 0;