/[webpac2]/trunk/t/1-validate-delimiters.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/1-validate-delimiters.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 829 by dpavlin, Sun May 20 16:19:19 2007 UTC revision 835 by dpavlin, Thu May 24 10:53:50 2007 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  use strict;  use strict;
4  use Test::More tests => 4;  use Test::More tests => 7;
5  use Test::Exception;  use Test::Exception;
6  use blib;  use blib;
7    
# Line 64  is_deeply( $v->{_delimiters_templates}, Line 64  is_deeply( $v->{_delimiters_templates},
64          901 => { "^a :  / ^b" => 2 },          901 => { "^a :  / ^b" => 2 },
65  }, 'just subfields and delimiters');  }, 'just subfields and delimiters');
66    
67    ok(my $dt = $v->delimiters_templates, 'delimiters_template');
68    diag $dt;
69    
70    ok($dt = $v->delimiters_templates( report => 1 ), 'delimiters_template report');
71    diag $dt;
72    
73    $v->{_validate_delimiters_templates} = {
74            900 => { '^a : ^b' => 1 },
75    };
76    
77    test_v({
78            '900' => [
79                    { 'a' => 'foo : bar', 'b' => 'baz' },
80                    { 'a' => 'foo', 'b' => 'baz' },
81                    { 'a' => 'foo' },
82                    { 'a' => 'foo : bar' },
83            ],
84    });
85    
86    ok (my $e = $v->report, 'report');
87    
88    diag $e;
89    diag dump( $v->{errors} );

Legend:
Removed from v.829  
changed lines
  Added in v.835

  ViewVC Help
Powered by ViewVC 1.1.26