X-Git-Url: http://git.rot13.org/?p=Biblio-SIP2.git;a=blobdiff_plain;f=sc-emulator.pl;h=715c014094c1a4eaac72f4fe175f50f2bf65d4ba;hp=e614cec30d83c8023064151e579bec2710302157;hb=e46b1e36be872896991f47226349f81b5839763a;hpb=584943f3bddc78b99d264b03ff01f4d87d430e6a diff --git a/sc-emulator.pl b/sc-emulator.pl index e614cec..715c014 100755 --- a/sc-emulator.pl +++ b/sc-emulator.pl @@ -24,7 +24,7 @@ sub sip2 { my $in = <$sock>; warn "<<<< ", dump($in), "\n"; - die unless $in =~ $patt; + die "expected $patt" unless $in =~ $patt; } # login @@ -33,3 +33,8 @@ sip2 "9300CN$user|CO$password|" => qr/^941/; # SC Status sip2 "9900302.00" => qr/^98/; +# Checkin +sip2 "09N20091214 08142820091214 081428AP|AOFFZG|AB1301036581|AC|BIN|" => qr/^10/; + +# Patron Information +sip2 "6300020091214 085452 AOFFZG|AA200903260093|AC$password|" => qr/^54/;