aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/libtest/first.c5
-rw-r--r--tests/libtest/test.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index 4f42136a0..528f1785c 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -8,6 +8,8 @@ extern void curl_memdebug(const char *);
/* test is provided in the test code file */
CURLcode test(char *url);
+char *arg2=NULL;
+
int main(int argc, char **argv)
{
char *URL;
@@ -15,6 +17,9 @@ int main(int argc, char **argv)
fprintf(stderr, "Pass URL as argument please\n");
return 1;
}
+ if(argc>2)
+ arg2=argv[2];
+
URL = argv[1]; /* provide this to the rest */
fprintf(stderr, "URL: %s\n", URL);
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index d9fbef311..a0d430842 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -1,3 +1,5 @@
#include <curl.h>
#include <stdio.h>
+extern char *arg2; /* set by first.c to the argv[2] or NULL */
+