r1399@llin: dpavlin | 2007-10-31 11:19:39 +0100
[webpac2] / t / 1-validate-delimiters.t
index 1a663a4..2f7e5b4 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 13;
+use Test::More tests => 15;
 use Test::Exception;
 use blib;
 
@@ -68,12 +68,17 @@ is_deeply( $v->{_delimiters_templates}, {
        901 => { "^a :  / ^b" => 2 },
 }, 'just subfields and delimiters');
 
-ok(my $dt = $v->delimiters_templates, 'delimiters_template');
+ok(! $v->delimiters_templates, 'no accumulated delimiters_template');
+
+ok(my $dt = $v->delimiters_templates( current_input => 1 ), 'delimiters_template');
 diag $dt if ( $debug );
 
-ok($dt = $v->delimiters_templates( report => 1 ), 'delimiters_template report');
+ok($dt = $v->delimiters_templates( report => 1, current_input => 1 ), 'delimiters_template report');
 diag $dt if ( $debug );
 
+$v->reset;
+ok( $v->delimiters_templates, 'have accumulated delimiters_templates');
+
 $v->{_validate_delimiters_templates} = {
        900 => { '^a : ^b' => 1 },
 };