projects
/
safeq
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added ipp utils and pdf driver for cups
[safeq]
/
terminal-emulator.pl
diff --git
a/terminal-emulator.pl
b/terminal-emulator.pl
index
e4ee9a1
..
9a91ede
100755
(executable)
--- a/
terminal-emulator.pl
+++ b/
terminal-emulator.pl
@@
-39,15
+39,6
@@
my @send_receive = grep { /^.+$/ } split(/\n/, q{
.NOP
.NOP
.NOP
.NOP
-.NOP
-.NOP
-
-.NOP
-.NOP
-
-.NOP
-.NOP
-
.END
});
.END
});
@@
-62,7
+53,7
@@
while ( @send_receive ) {
$got =~ s/[\r\n]+$//;
warn "# send/expect/got ",dump($send,$expect,$got);
warn "<< $got\n";
$got =~ s/[\r\n]+$//;
warn "# send/expect/got ",dump($send,$expect,$got);
warn "<< $got\n";
- if ( $expect ne substr($got,0,length($expect)) ) {
+ if (
defined $got && defined $expect &&
$expect ne substr($got,0,length($expect)) ) {
warn "ERROR expected [$expect] got [$got]\n";
print "Response>";
my $r = <STDIN>; chomp $r;
warn "ERROR expected [$expect] got [$got]\n";
print "Response>";
my $r = <STDIN>; chomp $r;