aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/Makefile.am4
-rw-r--r--tests/data/test52955
-rw-r--r--tests/libtest/Makefile.am12
-rw-r--r--tests/libtest/lib525.c8
4 files changed, 73 insertions, 6 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index a5eec9545..067499c6f 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -35,6 +35,4 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test256 test257 test258 test259 test260 test261 test262 test263 test264 \
test265 test266 test267 test268 test269 test270 test271 test272 test273 \
test274 test275 test524 test525 test276 test277 test526 test527 test528 \
- test530 DISABLED test278 test279 test531 test280
-
-
+ test530 DISABLED test278 test279 test531 test280 test529
diff --git a/tests/data/test529 b/tests/data/test529
new file mode 100644
index 000000000..d5c657d30
--- /dev/null
+++ b/tests/data/test529
@@ -0,0 +1,55 @@
+<info>
+<keywords>
+FTP
+PORT
+STOR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<tool>
+lib529
+</tool>
+ <name>
+FTP PORT upload using multi interface (weird cleanup function sequence)
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/path/529 log/upload529
+</command>
+<file name="log/upload529">
+Moooooooooooo
+ upload this
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^PORT .*
+^EPRT .*
+^LPRT .*
+</strip>
+<protocol>
+USER anonymous
+PASS curl_by_daniel@haxx.se
+PWD
+CWD path
+PORT 127,0,0,1,5,109
+TYPE I
+STOR 529
+QUIT
+</protocol>
+<upload>
+Moooooooooooo
+ upload this
+</upload>
+</verify>
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 877532dd9..4b52a5f9a 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -39,9 +39,10 @@ LIBDIR = $(top_builddir)/lib
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 lib521 lib523 lib524 lib525 lib526 lib527 lib530
+noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 \
+ lib507 lib508 lib509 lib510 lib511 lib512 lib513 lib514 lib515 lib516 \
+ lib517 lib518 lib519 lib520 lib521 lib523 lib524 lib525 lib526 lib527 \
+ lib529 lib530
lib500_SOURCES = lib500.c $(SUPPORTFILES)
lib500_LDADD = $(LIBDIR)/libcurl.la
@@ -152,6 +153,11 @@ lib527_CFLAGS = -DLIB527
lib527_LDADD = $(LIBDIR)/libcurl.la
lib527_DEPENDENCIES = $(LIBDIR)/libcurl.la
+lib529_SOURCES = lib525.c $(SUPPORTFILES)
+lib529_CFLAGS = -DLIB529
+lib529_LDADD = $(LIBDIR)/libcurl.la
+lib529_DEPENDENCIES = $(LIBDIR)/libcurl.la
+
lib530_SOURCES = lib530.c $(SUPPORTFILES)
lib530_CFLAGS = -DLIB530
lib530_LDADD = $(LIBDIR)/libcurl.la
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index 77e5c203a..240628028 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -123,9 +123,17 @@ int test(char *URL)
res = CURLM_CALL_MULTI_PERFORM;
}
+#ifdef LIB529
+ /* test 529 */
+ curl_multi_remove_handle(m, curl);
+ curl_multi_cleanup(m);
+ curl_easy_cleanup(curl);
+#else
+ /* test 525 */
curl_multi_remove_handle(m, curl);
curl_easy_cleanup(curl);
curl_multi_cleanup(m);
+#endif
fclose(hd_src); /* close the local file */