~ubuntu-branches/ubuntu/precise/padre/precise

« back to all changes in this revision

Viewing changes to xt/pmv.t

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2010-05-08 09:17:22 UTC
  • mfrom: (1.2.1 upstream) (10.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100508091722-y6008jtk0ap6znyn
Tags: 0.60.ds1-3
rules: run tests with HOME=$fake_home to avoud failing when $HOME points
to a non-existent location. Closes: #579289

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
# Copied from http://svn.ali.as/cpan/tools/shared/99_pmv.t
 
4
# Test that our declared minimum Perl version matches our syntax
 
5
 
 
6
use strict;
 
7
 
 
8
BEGIN {
 
9
        $|  = 1;
 
10
        $^W = 1;
 
11
}
 
12
 
 
13
my @MODULES = (
 
14
        'Perl::MinimumVersion 1.20',
 
15
        'Test::MinimumVersion 0.008',
 
16
);
 
17
 
 
18
# Don't run tests for installs
 
19
use Test::More;
 
20
unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
 
21
        plan( skip_all => "Author tests not required for installation" );
 
22
}
 
23
 
 
24
# Load the testing modules
 
25
foreach my $MODULE (@MODULES) {
 
26
        eval "use $MODULE";
 
27
        if ($@) {
 
28
                $ENV{RELEASE_TESTING}
 
29
                        ? die("Failed to load required release-testing module $MODULE")
 
30
                        : plan( skip_all => "$MODULE not available for testing" );
 
31
        }
 
32
}
 
33
 
 
34
all_minimum_version_from_metayml_ok();