9 our $user = 'sip2-user';
10 our $password = 'sip2-paasswd';
11 our $patron = 200000000042;
12 our $barcode = 1301132799;
15 require 'config.pl' if -e 'config.pl';
19 our $sock = IO::Socket::INET->new( '10.60.0.251:6001' );
23 my ( $send, $patt ) = @_;
24 SIP2::dump_message '>>>>', $send;
25 print $sock "$send\r\n";
31 SIP2::dump_message '<<<<', $in;
32 die "expected $patt" unless $in =~ $patt;
36 sip2 "9300CN$user|CO$password|" => qr/^941/;
39 sip2 "9900302.00" => qr/^98/;
42 sip2 "6300020091214 085452 AO$loc|AA$patron|AC$password|" => qr/^64/;
45 sip2 "11YN20091214 124436 AO$loc|AA$patron|AB$barcode|AC$password|BON|BIN|" => qw/12/;
48 sip2 "09N20091214 08142820091214 081428AP|AO$loc|AB$barcode|AC|BIN|" => qr/^10/;