aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-03-09 21:01:39 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-03-09 21:01:39 +0000
commit1962ebf8e7f918638c1601f2b05a705f502150a3 (patch)
treecb8a18717d135d6054f8ad20fd8ecb70cb61f220 /tests
parent7c144d5a7ec62f9191a3651705f2e8d80c2a7865 (diff)
Updated the test harness to check for protocol support before running each
test, fixing KNOWN_BUGS #11. Fixed some tests to more accurately specify their required servers and features.
Diffstat (limited to 'tests')
-rw-r--r--tests/FILEFORMAT16
-rw-r--r--tests/data/test193
-rw-r--r--tests/data/test203
-rw-r--r--tests/data/test2002
-rw-r--r--tests/data/test2012
-rw-r--r--tests/data/test2022
-rw-r--r--tests/data/test2032
-rw-r--r--tests/data/test2042
-rw-r--r--tests/data/test2052
-rw-r--r--tests/data/test2083
-rw-r--r--tests/data/test2122
-rw-r--r--tests/data/test5015
-rw-r--r--tests/data/test5043
-rw-r--r--tests/data/test753
-rw-r--r--tests/data/test763
-rw-r--r--tests/data/test793
-rw-r--r--tests/data/test873
-rwxr-xr-xtests/runtests.pl23
18 files changed, 71 insertions, 11 deletions
diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT
index f1c803058..398915a70 100644
--- a/tests/FILEFORMAT
+++ b/tests/FILEFORMAT
@@ -117,7 +117,17 @@ pipe: [num] - tell the server to expect this many HTTP requests before
<server>
What server(s) this test case requires/uses:
-'http' 'ftp', 'https', 'ftps', 'http-ipv6'. Give only one per line.
+
+file
+ftp
+ftp-ipv6
+ftps
+http
+http-ipv6
+https
+none
+
+Give only one per line. This subsection is mandatory.
</server>
<features>
@@ -134,6 +144,10 @@ libz
netrc_debug
OpenSSL
SSL
+
+as well as each protocol that curl supports. A protocol only needs to be
+specified if it is different from the server (useful when the server
+is 'none').
</features>
<killserver>
diff --git a/tests/data/test19 b/tests/data/test19
index aba75d3ec..dd60b8cf3 100644
--- a/tests/data/test19
+++ b/tests/data/test19
@@ -17,6 +17,9 @@ FAILURE
<server>
none
</server>
+<features>
+http
+</features>
<name>
attempt connect to non-listening socket
</name>
diff --git a/tests/data/test20 b/tests/data/test20
index cd1536060..d3bf30509 100644
--- a/tests/data/test20
+++ b/tests/data/test20
@@ -16,6 +16,9 @@ FAILURE
<server>
none
</server>
+<features>
+http
+</features>
<name>
attempt connect to non-existing host name
</name>
diff --git a/tests/data/test200 b/tests/data/test200
index 7b5ec41ff..23ac26afc 100644
--- a/tests/data/test200
+++ b/tests/data/test200
@@ -13,7 +13,7 @@ moo
# Client-side
<client>
<server>
-none
+file
</server>
<name>
basic file:// file
diff --git a/tests/data/test201 b/tests/data/test201
index e8ddb7fae..eb2422418 100644
--- a/tests/data/test201
+++ b/tests/data/test201
@@ -8,7 +8,7 @@
# Client-side
<client>
<server>
-none
+file
</server>
<name>
missing file:// file
diff --git a/tests/data/test202 b/tests/data/test202
index 5b578cbab..4344d64c8 100644
--- a/tests/data/test202
+++ b/tests/data/test202
@@ -8,7 +8,7 @@
# Client-side
<client>
<server>
-none
+file
</server>
<name>
two file:// URLs to stdout
diff --git a/tests/data/test203 b/tests/data/test203
index c1c04209b..c7cdce56e 100644
--- a/tests/data/test203
+++ b/tests/data/test203
@@ -13,7 +13,7 @@ moo
# Client-side
<client>
<server>
-none
+file
</server>
<name>
file:/path URL with a single slash
diff --git a/tests/data/test204 b/tests/data/test204
index cb21c6d38..c4e219e98 100644
--- a/tests/data/test204
+++ b/tests/data/test204
@@ -4,7 +4,7 @@
# Client-side
<client>
<server>
-none
+file
</server>
<name>
"upload" with file://
diff --git a/tests/data/test205 b/tests/data/test205
index 7bef1a868..edcf7fece 100644
--- a/tests/data/test205
+++ b/tests/data/test205
@@ -4,7 +4,7 @@
# Client-side
<client>
<server>
-none
+file
</server>
<name>
"upload" with file://
diff --git a/tests/data/test208 b/tests/data/test208
index 97eacbc45..eac3d5572 100644
--- a/tests/data/test208
+++ b/tests/data/test208
@@ -16,6 +16,9 @@ blablabla
<server>
http
</server>
+<features>
+ftp
+</features>
<name>
HTTP PUT a to a FTP URL with username+password - over HTTP proxy
</name>
diff --git a/tests/data/test212 b/tests/data/test212
index d745011d6..655a32f38 100644
--- a/tests/data/test212
+++ b/tests/data/test212
@@ -12,7 +12,7 @@ data blobb
ipv6
</features>
<server>
-ftp
+ftp-ipv6
</server>
<name>
Get two FTP files with no remote EPRT support
diff --git a/tests/data/test501 b/tests/data/test501
index f8a859157..99cd3b8f7 100644
--- a/tests/data/test501
+++ b/tests/data/test501
@@ -7,8 +7,11 @@
# Client-side
<client>
<server>
-file
+none
</server>
+<features>
+http
+</features>
# tool is what to use instead of 'curl'
<tool>
lib501
diff --git a/tests/data/test504 b/tests/data/test504
index 488fb5c77..dadd64a14 100644
--- a/tests/data/test504
+++ b/tests/data/test504
@@ -8,6 +8,9 @@
<server>
none
</server>
+<features>
+http
+</features>
# tool is what to use instead of 'curl'
<tool>
lib504
diff --git a/tests/data/test75 b/tests/data/test75
index 25440f513..779f0d883 100644
--- a/tests/data/test75
+++ b/tests/data/test75
@@ -17,6 +17,9 @@ FAILURE
<server>
none
</server>
+<features>
+http
+</features>
<name>
HTTP, urlglob retrieval with bad range
</name>
diff --git a/tests/data/test76 b/tests/data/test76
index d4094038b..ada3a3359 100644
--- a/tests/data/test76
+++ b/tests/data/test76
@@ -15,6 +15,9 @@ FAILURE
<server>
none
</server>
+<features>
+http
+</features>
<name>
HTTP, -O with no file name part in the URL
</name>
diff --git a/tests/data/test79 b/tests/data/test79
index 382eddde7..db97635e0 100644
--- a/tests/data/test79
+++ b/tests/data/test79
@@ -27,6 +27,9 @@ contents
<server>
http
</server>
+<features>
+ftp
+</features>
<name>
FTP over HTTP proxy
</name>
diff --git a/tests/data/test87 b/tests/data/test87
index 773165690..40b274b2e 100644
--- a/tests/data/test87
+++ b/tests/data/test87
@@ -15,6 +15,9 @@ FAILURE
<server>
none
</server>
+<features>
+http
+</features>
<name>
urlglob with bad -o #[num] usage
</name>
diff --git a/tests/runtests.pl b/tests/runtests.pl
index aeff8b4fa..5fb45b171 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -146,6 +146,7 @@ my $has_gnutls; # set if libcurl is built with GnuTLS
my $has_nss; # set if libcurl is built with NSS
my $has_textaware; # set if running on a system that has a text mode concept
# on files. Windows for example
+my @protocols; # array of supported protocols
my $skipped=0; # number of tests skipped; reported in main loop
my %skipped; # skipped{reason}=counter, reasons for skip
@@ -1021,8 +1022,16 @@ sub checksystem {
}
}
elsif($_ =~ /^Protocols: (.*)/i) {
- # these are the supported protocols, we don't use this knowledge
- # at this point
+ # these are the protocols compiled in to this libcurl
+ @protocols = split(' ', $1);
+
+ # Generate a "proto-ipv6" version of each protocol to match the
+ # IPv6 <server> name. This works even if IPv6 support isn't
+ # compiled in because the <features> test will fail.
+ push @protocols, map($_ . "-ipv6", @protocols);
+
+ # 'none' is used in test cases to mean no server
+ push @protocols, ('none');
}
elsif($_ =~ /^Features: (.*)/i) {
$feat = $1;
@@ -1283,6 +1292,10 @@ sub singletest {
next;
}
}
+ # See if this "feature" is in the list of supported protocols
+ elsif (grep /^$f$/, @protocols) {
+ next;
+ }
$why = "curl lacks $f support";
last;
@@ -2065,6 +2078,12 @@ sub serverfortest {
return "no server specified";
}
+ my $proto = lc($what[0]);
+ chomp $proto;
+ if (! grep /^$proto$/, @protocols) {
+ return "curl lacks $proto support";
+ }
+
return &startservers(@what);
}