diff options
Diffstat (limited to 'tests/libtest/test1013.pl')
-rwxr-xr-x | tests/libtest/test1013.pl | 17 |
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"; } |