This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update the Change log in Module::CoreList to include recent commits
[perl5.git] / cpan / autodie / t / version_tag.t
CommitLineData
0b09a93a
PF
1#!/usr/bin/perl -w
2use strict;
3use warnings;
4use Test::More tests => 3;
5
6eval {
7 use autodie qw(:1.994);
8
9 open(my $fh, '<', 'this_file_had_better_not_exist.txt');
10};
11
12isa_ok($@, 'autodie::exception', "Basic version tags work");
13
14
15# Expanding :1.00 should fail, there was no autodie :1.00
16eval { my $foo = autodie->_expand_tag(":1.00"); };
17
18isnt($@,"","Expanding :1.00 should fail");
19
20my $version = $autodie::VERSION;
21
22# Expanding our current version should work!
23eval { my $foo = autodie->_expand_tag(":$version"); };
24
25is($@,"","Expanding :$version should succeed");
26