Commit | Line | Data |
---|---|---|
0b09a93a PF |
1 | #!/usr/bin/perl -w |
2 | use strict; | |
3 | use warnings; | |
4 | use Test::More tests => 3; | |
5 | ||
6 | eval { | |
7 | use autodie qw(:1.994); | |
8 | ||
9 | open(my $fh, '<', 'this_file_had_better_not_exist.txt'); | |
10 | }; | |
11 | ||
12 | isa_ok($@, 'autodie::exception', "Basic version tags work"); | |
13 | ||
14 | ||
15 | # Expanding :1.00 should fail, there was no autodie :1.00 | |
16 | eval { my $foo = autodie->_expand_tag(":1.00"); }; | |
17 | ||
18 | isnt($@,"","Expanding :1.00 should fail"); | |
19 | ||
20 | my $version = $autodie::VERSION; | |
21 | ||
22 | # Expanding our current version should work! | |
23 | eval { my $foo = autodie->_expand_tag(":$version"); }; | |
24 | ||
25 | is($@,"","Expanding :$version should succeed"); | |
26 |