birthing MARCXMLSampler
[migration-tools.git] / Equinox-Migration / t / 01-SimpleTagList.t
index b1dc3bd..8ef29c0 100644 (file)
@@ -1,6 +1,6 @@
 #!perl -T
 
-use Test::More tests => 49;
+use Test::More tests => 51;
 #use Test::More qw(no_plan);
 
 use Equinox::Migration::SimpleTagList;
@@ -65,11 +65,13 @@ is ($stl->has(652), 1);
 is ($stl->has(654), 1);
 is ($stl->has(656), 1);
 is ($stl->has(658), 1);
+is ($stl->has(797), 1, 'exception is inline commented out');
 is ($stl->has(872), 1);
 is ($stl->has(900), 1);
 is ($stl->has(999), 1);
 is ($stl->has(988), 1);
 is ($stl->has(411), 0, 'exception');
+is ($stl->has(500), 0, 'inclusion commented out');
 is ($stl->has(655), 0, 'exception');
 is ($stl->has(915), 0, 'exception');
 is ($stl->has(987), 0, 'exception');
@@ -88,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");