2009-09-05 16:54:05 -04:00
|
|
|
package WgetFeature;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
2014-09-24 10:40:03 -04:00
|
|
|
use WgetTests;
|
2009-09-05 16:54:05 -04:00
|
|
|
|
|
|
|
our %skip_messages;
|
|
|
|
require 'WgetFeature.cfg';
|
|
|
|
|
|
|
|
sub import
|
|
|
|
{
|
|
|
|
my ($class, $feature) = @_;
|
|
|
|
|
|
|
|
my $output = `$WgetTest::WGETPATH --version`;
|
|
|
|
my ($list) = $output =~ /^([\+\-]\S+(?:\s+[\+\-]\S+)+)/m;
|
|
|
|
my %have_features = map {
|
|
|
|
my $feature = $_;
|
|
|
|
$feature =~ s/^.//;
|
|
|
|
($feature, /^\+/ ? 1 : 0);
|
|
|
|
} split /\s+/, $list;
|
|
|
|
|
|
|
|
unless ($have_features{$feature}) {
|
|
|
|
print $skip_messages{$feature}, "\n";
|
2014-10-30 10:41:07 -04:00
|
|
|
exit 77; # skip
|
2009-09-05 16:54:05 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|