~ubuntu-branches/ubuntu/wily/libintl-perl/wily-proposed

« back to all changes in this revision

Viewing changes to test.pl

  • Committer: Bazaar Package Importer
  • Author(s): Peter Eisentraut
  • Date: 2005-11-18 09:41:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20051118094142-3gdzz3ljdxav8aha
Tags: 1.16-1
* New upstream release
* Added FAQ and THANKS to installation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /usr/local/bin/perl -w
2
2
 
3
3
# vim: tabstop=4
4
 
# $Id: test.pl,v 1.4 2004/01/08 17:25:57 guido Exp $
 
4
# $Id: test.pl,v 1.6 2005/09/27 23:16:23 guido Exp $
5
5
 
6
6
# Portable character conversion for Perl.
7
7
# Copyright (C) 2002-2004 Guido Flohr <guido@imperia.net>,
42
42
 
43
43
test_harness ($ENV{TEST_HARNESS} || 0, @lib_dirs);
44
44
 
45
 
# This function is stolen from ExtUtils::Command::MM.  I did not want
46
 
# libintl-perl depend on ExtUtils::Command::MM because this drags in
47
 
# a long dependency chain when installing via CPAN.pm.
48
45
sub test_harness
49
46
{
50
47
    $Test::Harness::verbose = shift;
51
48
        
52
49
    local @INC = @INC;
53
50
    unshift @INC, map { File::Spec->rel2abs($_) } @_;
54
 
    Test::Harness::runtests(sort { lc $a cmp lc $b } @ARGV);
 
51
        my $name = $0;
 
52
        $name =~ s,test\.pl$,xs_disabled,;
 
53
        local *HANDLE;
 
54
        open HANDLE, "<$name" or die "cannot open '$name': $!";
 
55
        my $xs_disabled = <HANDLE>;
 
56
        if ($xs_disabled) {
 
57
                Test::Harness::runtests (grep { ! /_xs.t$/ } sort 
 
58
                        {lc $a cmp lc $b } @ARGV);
 
59
        } else {
 
60
                Test::Harness::runtests (sort {lc $a cmp lc $b } @ARGV);
 
61
        }
55
62
}
56
63
 
57
64
__END__