Cope with trailing whitespace on the titles returned from the
authordjfiander <djfiander>
Thu, 31 Aug 2006 21:53:18 +0000 (21:53 +0000)
committerdjfiander <djfiander>
Thu, 31 Aug 2006 21:53:18 +0000 (21:53 +0000)
ILS, since that seems to be a problem for PINES

t/03checkout.t
t/08checkin.t
t/09renew.t
t/11item_info.t

index af05b68..da9dd28 100644 (file)
@@ -48,7 +48,7 @@ my $checkout_test_template = {
                 pat      => qr/^$item_barcode$/o,
                 required => 1, },
               { field    => FID_TITLE_ID,
-                pat      => qr/^$item_title$/o,
+                pat      => qr/^$item_title\s*$/o,
                 required => 1, },
               { field    => FID_DUE_DATE,
                 pat      => $textpat,
@@ -111,7 +111,7 @@ foreach my $i (0 .. (scalar @{$test->{fields}})-1) {
     if ($field->{field} eq FID_ITEM_ID) {
        $field->{pat} = qr/^$item_diacritic_barcode$/;
     } elsif ($field->{field} eq FID_TITLE_ID) {
-       $field->{pat} = qr/^$item_diacritic_title$/;
+       $field->{pat} = qr/^$item_diacritic_title\s*$/;
     } elsif ($field->{field} eq FID_OWNER) {
        $field->{pat} = qr/^$item_diacritic_owner$/;
     }
@@ -170,7 +170,7 @@ $test->{fields} = [
                     pat      => qr/^$item_barcode$/o,
                     required => 1, },
                   { field    => FID_TITLE_ID,
-                    pat      => qr/^$item_title$/o,
+                    pat      => qr/^$item_title\s*$/o,
                     required => 1, },
                   { field    => FID_DUE_DATE,
                     pat      => qr/^$/,
index fd63f29..395cda5 100644 (file)
@@ -28,7 +28,7 @@ my $checkin_test_template = {
                 pat      => $textpat,
                 required => 1, },
               { field    => FID_TITLE_ID,
-                pat      => qr/^$item_title$/o,
+                pat      => qr/^$item_title\s*$/o,
                 required => 1, }, # not required by the spec.
               ],};
 
index d756303..ad9fb06 100644 (file)
@@ -54,7 +54,7 @@ my $renew_test_template = {
                                        pat      => qr/^$item_barcode$/,
                                        required => 1, },
                                      { field    => FID_TITLE_ID,
-                                       pat      => qr/^$item_title$/,
+                                       pat      => qr/^$item_title\s*$/,
                                        required => 1, },
                                      { field    => FID_DUE_DATE,
                                        pat      => qr/^$datepat$/,
@@ -101,7 +101,7 @@ foreach my $field (@{$test->{fields}}) {
     if ($field->{field} eq FID_DUE_DATE) {
        $field->{pat} = qr/^$/;
     } elsif ($field->{field} eq FID_TITLE_ID) {
-       $field->{pat} = qr/^($item_title|)$/;
+       $field->{pat} = qr/^($item_title\s*|)$/;
     }
 }
 
@@ -131,7 +131,7 @@ foreach my $field (@{$test->{fields}}) {
     } elsif ($field->{field} eq FID_PATRON_ID) {
        $field->{pat} = qr/^berick$/;
     } elsif ($field->{field} eq FID_TITLE_ID) {
-       $field->{pat} = qr/^($item_title|)$/;
+       $field->{pat} = qr/^($item_title\s*|)$/;
     }
 }
 
index 2a1fec7..a0d7ad2 100644 (file)
@@ -21,7 +21,7 @@ my $item_info_test_template = {
                 pat      => qr/^$item_barcode$/,
                 required => 1, },
               { field    => FID_TITLE_ID,
-                pat      => qr/^$item_title$/,
+                pat      => qr/^$item_title\s*$/,
                 required => 1, },
               { field    => FID_MEDIA_TYPE,
                 pat      => qr/^\d{3}$/,