projects
/
safeq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26b71ac
)
match expect on prefix to enable different number of documents
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 23 Feb 2019 13:39:05 +0000
(14:39 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 23 Feb 2019 13:39:05 +0000
(14:39 +0100)
terminal-emulator.pl
patch
|
blob
|
history
diff --git
a/terminal-emulator.pl
b/terminal-emulator.pl
index
781d353
..
e4ee9a1
100755
(executable)
--- a/
terminal-emulator.pl
+++ b/
terminal-emulator.pl
@@
-31,7
+31,7
@@
my @send_receive = grep { /^.+$/ } split(/\n/, q{
.CARD OK Ime Prezime (nobody@example.com)
.ACTION
-.ACTION CMENUS
0
+.ACTION CMENUS
.NOP
.NOP
@@
-62,7
+62,7
@@
while ( @send_receive ) {
$got =~ s/[\r\n]+$//;
warn "# send/expect/got ",dump($send,$expect,$got);
warn "<< $got\n";
- if ( $expect ne
$got
) {
+ if ( $expect ne
substr($got,0,length($expect))
) {
warn "ERROR expected [$expect] got [$got]\n";
print "Response>";
my $r = <STDIN>; chomp $r;