File: zz-pmv.t

package info (click to toggle)
libtemplate-perl 2.24-1.2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 8,676 kB
  • ctags: 1,427
  • sloc: perl: 14,535; makefile: 15; sh: 5
file content (43 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/perl

# Test that our declared minimum Perl version matches our syntax

use strict;
BEGIN {
    $|  = 1;
    $^W = 1;
}

my @MODULES = (
    'Perl::MinimumVersion 1.20',
    'Test::MinimumVersion 0.008',
);

# Don't run tests for installs
use Test::More;

# NOTE: Perl::MinimumVersion / PPI can't parse hash definitions with utf8 
# values or keys.  That means that t/stash-xs-unicode.t always fails.  We
# have no option but to disable this test until PPI can handle this case
# or Test::MinimumVersion gives us a way to specify files to skip.

plan( skip_all => "These aren't the tests you're looking for... move along" );

# NOTHING RUN PAST THIS POINT

unless ( $ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING} ) {
    plan( skip_all => "Author tests not required for installation" );
}

# Load the testing modules
foreach my $MODULE ( @MODULES ) {
    eval "use $MODULE";
    if ( $@ ) {
        $ENV{RELEASE_TESTING}
            ? die( "Failed to load required release-testing module $MODULE" )
            : plan( skip_all => "$MODULE not available for testing" );
    }
}

#all_minimum_version_ok(5.006);
minimum_version_ok('t/stash-xs-unicode.t', 5.006);