r1200@llin: dpavlin | 2007-04-11 13:38:57 +0200
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 11 Apr 2007 12:22:31 +0000 (12:22 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 11 Apr 2007 12:22:31 +0000 (12:22 +0000)
 cleanup test (call patch /fake/ because they are),
 added test which fails because of empty subfield modify bug

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@820 07558da8-63fa-0310-ba24-9fe276d99e06

t/2-input.t
t/conf/modify/test.pl

index 5ce5e73..2cf9069 100755 (executable)
@@ -134,7 +134,7 @@ $WebPAC::Input::Test::rec = {
 
 $WebPAC::Input::Test::size = 42;
 
-ok($input->open( path => "$abs_path/modify_isis/LIBRI", ), "open modify_isis (plain)");
+ok($input->open( path => "/fake/path", ), "open modify_isis (plain)");
 
 cmp_ok($input->size, '==', 42, 'size');
 
@@ -143,7 +143,7 @@ ok(my $rec_p = $input->fetch, 'fetch');
 # modify_records
 
 ok($input->open(
-       path => "$abs_path/modify_isis/LIBRI",
+       path => "/another/fake/path",
        modify_records => {
                200 => {
                        '*' => { '^c' => '. ' },
@@ -170,7 +170,7 @@ cmp_ok(
 my $modify_file = "$abs_path/conf/modify/test.pl";
 
 ok($input->open(
-       path => "$abs_path/modify_isis/LIBRI",
+       path => "/and/another/fake/path",
        modify_file => $modify_file,
 ), "open (with modify_file $modify_file)");
 
@@ -189,3 +189,8 @@ test_filter(200,
        '^a foo^kbar^dbaz : zzz',
 );
 
+# empty subfield removal
+test_filter(901,
+       '^a^efoo',
+       '^efoo',
+);
index 8949ee9..f068afa 100644 (file)
@@ -35,3 +35,8 @@
 702
   '^a'
     '^b' => ', '
+
+# empty subfield removal
+901
+  '^a'
+    '^e' => ': ^e'