2 # Before `make install' is performed this script should be runnable with
3 # `make test'. After `make install' it should work as `perl test.pl'
5 #########################
7 use Test::More qw/no_plan/;
10 (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm';
12 use_ok('version', 0.96);
15 diag "Tests with base class" unless $ENV{PERL_CORE};
17 BaseTests("version","new","qv");
18 BaseTests("version","new","declare");
19 BaseTests("version","parse", "qv");
20 BaseTests("version","parse", "declare");
22 # dummy up a redundant call to satify David Wheeler
23 local $SIG{__WARN__} = sub { die $_[0] };
25 unlike ($@, qr/^Subroutine main::declare redefined/,
26 "Only export declare once per package (to prevent redefined warnings).");
28 # https://rt.cpan.org/Ticket/Display.html?id=47980
31 $@ = qq(Can't locate some/completely/fictitious/module.pm);
32 return IO::Handle->VERSION;
34 ok defined($v), 'Fix for RT #47980';