diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2005-07-28 13:20:27 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2005-07-28 13:20:27 +0000 |
commit | 34a827bbfe6f10588ead48f2bb9721c6c927ec89 (patch) | |
tree | 2ce62630c3f573c43710bb3c7ab2d45da874c36e /tests | |
parent | 726b9e2240a272304cefc61b6fb9d9bb9a9a78f4 (diff) | |
download | curl-34a827bbfe6f10588ead48f2bb9721c6c927ec89.tar.gz |
Needs 'struct_stat'. Increased verbosity.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libtest/lib505.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c index 148778186..dc82e2d8f 100644 --- a/tests/libtest/lib505.c +++ b/tests/libtest/lib505.c @@ -8,6 +8,7 @@ * $Id$ */ +#include "setup.h" /* struct_stat etc. */ #include "test.h" #ifdef HAVE_SYS_SOCKET_H @@ -46,10 +47,16 @@ int test(char *URL) const char *buf_1 = "RNFR 505"; const char *buf_2 = "RNTO 505-forreal"; + if (!arg2) { + fprintf(stderr, "Usage: <url> <file-to-upload>\n"); + return -1; + } + /* get the file size of the local file */ hd = stat(arg2, &file_info); if(hd == -1) { /* can't open file, bail out */ + fprintf(stderr, "WARNING: cannot open file %s\n", arg2); return -1; } |