~ubuntu-branches/ubuntu/lucid/wget/lucid-security

« back to all changes in this revision

Viewing changes to tests/WgetFeature.pm

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2009-12-12 08:15:59 UTC
  • mfrom: (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091212081559-mvccl4kzdqb138y3
Tags: 1.12-1.1ubuntu1
* Merge from debian testing, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
* Keep build dependencies in main:
  - debian/control: remove info2man build-dep
  - debian/patches/00list: disable wget-infopod_generated_manpage.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package WgetFeature;
 
2
 
 
3
use strict;
 
4
use warnings;
 
5
 
 
6
use WgetTest;
 
7
 
 
8
our %skip_messages;
 
9
require 'WgetFeature.cfg';
 
10
 
 
11
sub import
 
12
{
 
13
    my ($class, $feature) = @_;
 
14
 
 
15
    my $output = `$WgetTest::WGETPATH --version`;
 
16
    my ($list) = $output =~ /^([\+\-]\S+(?:\s+[\+\-]\S+)+)/m;
 
17
    my %have_features = map {
 
18
        my $feature = $_;
 
19
           $feature =~ s/^.//;
 
20
          ($feature, /^\+/ ? 1 : 0);
 
21
    } split /\s+/, $list;
 
22
 
 
23
    unless ($have_features{$feature}) {
 
24
        print $skip_messages{$feature}, "\n";
 
25
        exit 2; # skip
 
26
    }
 
27
}
 
28
 
 
29
1;