summaryrefslogtreecommitdiff
path: root/t/900_perl_minimum_version.t
diff options
context:
space:
mode:
Diffstat (limited to 't/900_perl_minimum_version.t')
-rw-r--r--t/900_perl_minimum_version.t34
1 files changed, 34 insertions, 0 deletions
diff --git a/t/900_perl_minimum_version.t b/t/900_perl_minimum_version.t
new file mode 100644
index 0000000..8b51c57
--- /dev/null
+++ b/t/900_perl_minimum_version.t
@@ -0,0 +1,34 @@
+#!/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 during end-user installs
+use Test::More;
+unless (-d '.git' || $ENV{IS_MAINTAINER}) {
+ plan( skip_all => "Author tests not required for installation" );
+}
+
+# Load the testing modules
+foreach my $MODULE ( @MODULES ) {
+ eval "use $MODULE";
+ if ( $@ ) {
+ plan( skip_all => "$MODULE not available for testing" );
+ die "Failed to load required release-testing module $MODULE"
+ if -d '.git' || $ENV{IS_MAINTAINER};
+ }
+}
+
+# Note: constant_hash requires 5.8 but works okay with 5.6.2 here
+all_minimum_version_ok("5.008");
+
+1;