From: Joe Atzberger <atz@esilibrary.com>
Date: Wed, 12 May 2010 22:07:36 +0000 (+0000)
Subject: Extra read_it catches telnet confirmation prompt
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e7aaed22e4b5e7d30d29045a07f546b4d79e42b2;p=SIPServer.git

Extra read_it catches telnet confirmation prompt
---

diff --git a/t/test_Socket.pl b/t/test_Socket.pl
index f1bba41..ac32ad6 100755
--- a/t/test_Socket.pl
+++ b/t/test_Socket.pl
@@ -31,8 +31,9 @@ my $pass = 'sip_01';
 my $inst = 'CONS';
 
 my @input = (
-    "9300CN$user|CO$pass|CP$inst|",
-    '9910302.00',
+   "9300CN$user|CO$pass|CP$inst|",
+   '9910302.00',
+    "1720060110    215612AO$inst|AB858115052035|",
 );
 
 if ($server =~ /:8023$/) {
@@ -40,6 +41,7 @@ if ($server =~ /:8023$/) {
     do_the_write_thing($user);
     read_it(1);
     do_the_write_thing($pass);
+    read_it();
 }
 
 print scalar(@input), " lines of input\n";
@@ -82,6 +84,7 @@ sub read_it {
     my $resp = <$sock>;
     alarm 0;
     defined($resp) or die "No response from server $server $@";
+    $resp =~ s/^\s*//;
     print "RX: $resp\n";
 }