added regexpes to new as option
[Biblio-Isis] / t / 2_isis.t
index dd46771..7328e8e 100755 (executable)
@@ -3,7 +3,7 @@
 use strict;
 use blib;
 
-use Test::More tests => 136;
+use Test::More tests => 139;
 use File::Spec;
 
 BEGIN {
@@ -315,7 +315,6 @@ warn "----- patt: $patt -> $new_sf\n";
 
 diag "generated regexpes = ", Dumper( $regexpes );
 
-
 ok($hash = $isis->to_hash({ mfn => $isis->mfn, regexps => $regexpes, }), 'to_hash(mfn,regexpes)');
 diag "to_hash = ",Dumper( $hash ) if ($debug);
 is_deeply( $hash, {
@@ -327,3 +326,8 @@ is_deeply( $hash, {
               { c => ["901c-3", "901c-3"] },
             ],
 }, 'hash is_deeply');
+
+ok($isis->{regexpes} = $regexpes, 'isis->{regexpes}');
+ok($hash2 = $isis->to_hash( $isis->mfn ), 'to_hash(mfn), global regexpes');
+diag "to_hash = ",Dumper( $hash ) if ($debug);
+is_deeply( $hash2, $hash, 'hash is_deeply');