X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=Equinox-Migration%2Ft%2F01-SimpleTagList.t;h=0d4c9a4f32914b273caa0ac01e7d6380a84e3e11;hp=69a199446e27ac36f5660bbed0dc8af7eacd65ed;hb=7b6f5557a05fa7e4cd09f433398ea4f6368ae519;hpb=f3f1703187556e900e3b1b5e0f00ef8cce14da52 diff --git a/Equinox-Migration/t/01-SimpleTagList.t b/Equinox-Migration/t/01-SimpleTagList.t index 69a1994..0d4c9a4 100644 --- a/Equinox-Migration/t/01-SimpleTagList.t +++ b/Equinox-Migration/t/01-SimpleTagList.t @@ -7,7 +7,7 @@ use Equinox::Migration::SimpleTagList; # baseline object creation eval { my $stl = Equinox::Migration::SimpleTagList->new( file => "thefileisalie.txt" ) }; -is ($@ =~ /^Can't open tags file:/, 1, 'cannot open that'); +is ($@ =~ /^Can't open tags file 'thefileisalie\.txt':/, 1, 'cannot open that'); my $stl = Equinox::Migration::SimpleTagList->new(); is(ref $stl, "Equinox::Migration::SimpleTagList", "self is self"); @@ -90,13 +90,11 @@ is ($stl->has(304), 0, 'exception'); # file with bad token $. = 0; $stl = Equinox::Migration::SimpleTagList->new; -$stl->{conf}{file} = "./t/corpus/stl-2.txt"; -eval {$stl->generate}; +eval {$stl->generate("./t/corpus/stl-2.txt")}; is ($@, "Unknown chunk fnord in tags file (line 1)\n"); # file with except in wrong place $. = 0; $stl = Equinox::Migration::SimpleTagList->new; -$stl->{conf}{file} = "./t/corpus/stl-3.txt"; -eval {$stl->generate}; +eval {$stl->generate("./t/corpus/stl-3.txt")}; is ($@, "Keyword 'except' can only follow a range (line 1)\n");