From 6f33531861c02602446c7d2d30e0aaff271557f4 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 1 Nov 2007 03:09:27 +0000 Subject: Added test case 1014 to compare curl-config --features with curl --version --- tests/libtest/test1013.pl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'tests/libtest/test1013.pl') 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_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( ) { 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"; } -- cgit v1.2.3