version_tag.t revision 1.1
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 27