Very basic tests. This will be a big test case. I suspect that
authordjfiander <djfiander>
Wed, 26 Apr 2006 14:37:19 +0000 (14:37 +0000)
committerdjfiander <djfiander>
Wed, 26 Apr 2006 14:37:19 +0000 (14:37 +0000)
the test harness will have to be enhanced in a variety of ways,
including some way of indicating fields that SHOULD NOT appear,
as well as just fields that are required.

t/02patron_info.t [new file with mode: 0644]

diff --git a/t/02patron_info.t b/t/02patron_info.t
new file mode 100644 (file)
index 0000000..39a7994
--- /dev/null
@@ -0,0 +1,26 @@
+# 
+# patron_info: test Patron Information Response
+
+use strict;
+use warnings;
+
+use Sip::Constants qw(:all);
+
+use SIPtest qw($datepat);
+
+my @tests = (
+            $SIPtest::login_test,
+            $SIPtest::sc_status_test,
+            { id => 'valid Patron Info no details',
+              msg => '6300020060329    201700          AOUWOLS|AAdjfiander|',
+              pat => qr/^64 [ Y]{13}\d{3}$datepat(\d{4}){6}/,
+              fields => [
+                         $SIPtest::field_specs{(FID_INST_ID)},
+                         $SIPtest::field_specs{(FID_SCREEN_MSG)},
+                         $SIPtest::field_specs{(FID_PRINT_LINE)},
+                         ], },
+            );
+
+SIPtest::run_sip_tests(@tests);
+
+1;