test repeatable subfields
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 8 Sep 2006 14:35:31 +0000 (14:35 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 8 Sep 2006 14:35:31 +0000 (14:35 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@659 07558da8-63fa-0310-ba24-9fe276d99e06

t/1-validate.t
t/data/validate_test

index 170c15d..68ad24c 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 43;
+use Test::More tests => 50;
 use Test::Exception;
 use blib;
 
@@ -31,6 +31,7 @@ is_deeply( $v->{rules}, {
        '902' => [ 'b', 'c' ],
        '903' => [ 'a', 'b', 'c' ],
        '904' => [ 'a' ],
+       '905' => [ 'a*' ],
 }, 'rules parsed');
 
 
@@ -122,3 +123,14 @@ test_v({
        '904' => [ { 'b' => 1 } ]
 }, qw/field 904 subfield extra b/);
 
+test_v({
+       '904' => [ { 'a' => [ 1,2 ] } ]
+}, qw/field 904 subfield extra_repeatable a/);
+
+test_v({
+       '905' => [ { 'a' => [ 1,2 ] } ]
+});
+
+test_v({
+       '905' => [ ]
+});
index f67afe2..a35ad7a 100644 (file)
@@ -7,3 +7,4 @@
 902 b c
 903 a b c
 904 a!
+905 a*