aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-14 06:30:37 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-14 06:30:37 +0000
commitaba6c2b89d96f661c2b4d77fc925b47921008e3d (patch)
treecfba0ca73a324d4b83960e849c8f9aa0fcb3de8a /tests/libtest
parent9c0a386246f2fc073419425a231c9a58cee77952 (diff)
Added test case 511 in an attempt to repeat bug report #934666 "storage leak
in ftp.c", but it shows no leaking.
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/Makefile.am9
-rw-r--r--tests/libtest/lib511.c14
2 files changed, 21 insertions, 2 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index c636a0901..a62ab5114 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -34,11 +34,12 @@ INCLUDES = -I$(top_srcdir)/include/curl \
LIBDIR = $(top_builddir)/lib
+# these files are used in every single test program below
SUPPORTFILES = first.c test.h
-# here are all tools used for running libcurl tests
+# These are all libcurl test programs
noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 lib507 \
- lib508 lib509 lib510
+ lib508 lib509 lib510 lib511
lib500_SOURCES = lib500.c $(SUPPORTFILES)
lib500_LDADD = $(LIBDIR)/libcurl.la
@@ -83,3 +84,7 @@ lib509_DEPENDENCIES = $(LIBDIR)/libcurl.la
lib510_SOURCES = lib510.c $(SUPPORTFILES)
lib510_LDADD = $(LIBDIR)/libcurl.la
lib510_DEPENDENCIES = $(LIBDIR)/libcurl.la
+
+lib511_SOURCES = lib511.c $(SUPPORTFILES)
+lib511_LDADD = $(LIBDIR)/libcurl.la
+lib511_DEPENDENCIES = $(LIBDIR)/libcurl.la
diff --git a/tests/libtest/lib511.c b/tests/libtest/lib511.c
new file mode 100644
index 000000000..9b9980a71
--- /dev/null
+++ b/tests/libtest/lib511.c
@@ -0,0 +1,14 @@
+#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_FILETIME, 1);
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
+ res = curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+ return (int)res;
+}
+