aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-04-18 19:41:04 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-04-18 19:41:04 +0000
commit63d109f7be8ddd027c86355dd09d02189b731a46 (patch)
tree42ee3aeb062c4a2de48fa534b6e2ff19aeea902a /tests/libtest
parentc904b6b5bf6c6e980480e63cd066dc2ae2aace23 (diff)
Olivier reported that even though he used CURLOPT_PORT, libcurl clearly still
used the default port. He was right. I fixed the problem and added the test cases 521, 522 and 523 to verify the fix.
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/Makefile.am10
-rw-r--r--tests/libtest/lib521.c16
-rw-r--r--tests/libtest/lib523.c17
3 files changed, 42 insertions, 1 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index acdeb5501..ccbe2aa16 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -40,7 +40,7 @@ SUPPORTFILES = first.c test.h
# These are all libcurl test programs
noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 lib507 \
lib508 lib509 lib510 lib511 lib512 lib513 lib514 lib515 lib516 lib517 \
- lib518 lib519 lib520
+ lib518 lib519 lib520 lib521 lib523
lib500_SOURCES = lib500.c $(SUPPORTFILES)
lib500_LDADD = $(LIBDIR)/libcurl.la
@@ -125,3 +125,11 @@ lib519_DEPENDENCIES = $(LIBDIR)/libcurl.la
lib520_SOURCES = lib520.c $(SUPPORTFILES)
lib520_LDADD = $(LIBDIR)/libcurl.la
lib520_DEPENDENCIES = $(LIBDIR)/libcurl.la
+
+lib521_SOURCES = lib521.c $(SUPPORTFILES)
+lib521_LDADD = $(LIBDIR)/libcurl.la
+lib521_DEPENDENCIES = $(LIBDIR)/libcurl.la
+
+lib523_SOURCES = lib523.c $(SUPPORTFILES)
+lib523_LDADD = $(LIBDIR)/libcurl.la
+lib523_DEPENDENCIES = $(LIBDIR)/libcurl.la
diff --git a/tests/libtest/lib521.c b/tests/libtest/lib521.c
new file mode 100644
index 000000000..96630f303
--- /dev/null
+++ b/tests/libtest/lib521.c
@@ -0,0 +1,16 @@
+#include "test.h"
+
+int test(char *URL)
+{
+ CURLcode res;
+ CURL *curl = curl_easy_init();
+ curl_easy_setopt(curl, CURLOPT_URL, URL);
+ curl_easy_setopt(curl, CURLOPT_PORT, atoi(arg2));
+ curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy");
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
+
+ res = curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+ return (int)res;
+}
+
diff --git a/tests/libtest/lib523.c b/tests/libtest/lib523.c
new file mode 100644
index 000000000..d0a41c5f5
--- /dev/null
+++ b/tests/libtest/lib523.c
@@ -0,0 +1,17 @@
+#include "test.h"
+
+int test(char *URL)
+{
+ CURLcode res;
+ CURL *curl = curl_easy_init();
+ curl_easy_setopt(curl, CURLOPT_PROXY, arg2);
+ curl_easy_setopt(curl, CURLOPT_URL, URL);
+ curl_easy_setopt(curl, CURLOPT_PORT, 19999);
+ curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy");
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
+
+ res = curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+ return (int)res;
+}
+