aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-11-01 03:09:27 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-11-01 03:09:27 +0000
commit6f33531861c02602446c7d2d30e0aaff271557f4 (patch)
tree1521f0da3c07f2fe7d2906af2c488dec7c3a41e1 /tests/libtest
parent16897354bcbb2afbc81d0d985a940dbe37cac986 (diff)
Added test case 1014 to compare curl-config --features with curl --version
Diffstat (limited to 'tests/libtest')
-rwxr-xr-xtests/libtest/test1013.pl17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/libtest/test1013.pl b/tests/libtest/test1013.pl
index 8e5c7368e..6c5a5dcdc 100755
--- a/tests/libtest/test1013.pl
+++ b/tests/libtest/test1013.pl
@@ -1,25 +1,28 @@
#!/usr/bin/env perl
# Determine if curl-config --protocols matches the curl --version protocols
-if ( $#ARGV != 1 )
+if ( $#ARGV != 2 )
{
- print "Usage: $0 curl-config-script curl-features-file\n";
+ print "Usage: $0 curl-config-script curl-features-file features|protocols\n";
exit 3;
}
+my $what=$ARGV[2];
+
my $curl_protocols="";
-open(CURL, "@ARGV[1]") || die "Can't get curl protocols list\n";
+open(CURL, "@ARGV[1]") || die "Can't get curl $what list\n";
while( <CURL> )
{
- $curl_protocols = $_ if ( /Protocols:/ );
+ $curl_protocols = lc($_) if ( /$what:/i );
}
close CURL;
-$curl_protocols =~ /Protocols: (.*)$/;
+$curl_protocols =~ /\w+: (.*)$/;
@curl = split / /,$1;
+@curl = grep(!/^Debug|Largefile$/i, @curl);
@curl = sort @curl;
my @curl_config;
-open(CURLCONFIG, "sh @ARGV[0] --protocols|") || die "Can't get curl-config protocols list\n";
+open(CURLCONFIG, "sh @ARGV[0] --$what|") || die "Can't get curl-config $what list\n";
while( <CURLCONFIG> )
{
chomp;
@@ -34,7 +37,7 @@ my $curlconfigproto = join ' ', @curl_config;
my $different = $curlproto ne $curlconfigproto;
if ($different) {
- print "Mismatch in protocol lists:\n";
+ print "Mismatch in $what lists:\n";
print "curl: $curlproto\n";
print "curl-config: $curlconfigproto\n";
}