Debian Codegraph @

cpan/autodie/t/version.t

raw
1 #!/usr/bin/perl -w
2 use strict;
3 use Test::More;
4
5 if (not $ENV{RELEASE_TESTING}) {
6 plan( skip_all => 'Release test. Set $ENV{RELEASE_TESTING} to true to run.');
7 }
8
9 if( $ENV{AUTOMATED_TESTING} ) {
10 plan( skip_all => 'This test requires dzil and that is not supported on github actions');
11 }
12
13 plan tests => 8;
14
15 # For the moment, we'd like all our versions to be the same.
16 # In order to play nicely with some code scanners, they need to be
17 # hard-coded into the files, rather than just nicking the version
18 # from autodie::exception at run-time.
19
20 require Fatal;
21 require autodie;
22 require autodie::hints;
23 require autodie::exception;
24 require autodie::exception::system;
25
26 diag(explain(\%ENV));
27
28 ok(defined($autodie::VERSION), 'autodie has a version');
29 ok(defined($autodie::exception::VERSION), 'autodie::exception has a version');
30 ok(defined($autodie::hints::VERSION), 'autodie::hints has a version');
31 ok(defined($Fatal::VERSION), 'Fatal has a version');
32 is($Fatal::VERSION, $autodie::VERSION);
33 is($autodie::VERSION, $autodie::exception::VERSION);
34 is($autodie::exception::VERSION, $autodie::exception::system::VERSION);
35 is($Fatal::VERSION, $autodie::hints::VERSION);