Browse Source

don't eat array lead-in on empty arrays

wip/maildir-uid-dupes-test
Oswald Buddenhagen 19 years ago
parent
commit
963f607c81
  1. 8
      src/run-tests.pl

8
src/run-tests.pl

@ -316,10 +316,10 @@ sub showbox($$)
my ($bn) = @_; my ($bn) = @_;
my ($mu, %ms) = readbox($bn); my ($mu, %ms) = readbox($bn);
print " [ $mu,\n ";
my $frst = 1; my $frst = 1;
for my $num (sort {$a <=> $b} keys %ms) { for my $num (sort {$a <=> $b} keys %ms) {
if ($frst) { if ($frst) {
print " [ $mu,\n ";
$frst = 0; $frst = 0;
} else { } else {
print ", "; print ", ";
@ -338,18 +338,16 @@ sub showchan()
die "Cannot read sync state.\n"; die "Cannot read sync state.\n";
$_ = <FILE>; $_ = <FILE>;
/^1:(\d+) 1:(\d+):(\d+)\n$/; /^1:(\d+) 1:(\d+):(\d+)\n$/;
my ($mxm, $mms, $mxs) = ($1, $2, $3); print " [ $1, $2, $3,\n ";
my $frst = 1; my $frst = 1;
for (<FILE>) { for (<FILE>) {
/^(\d+) (\d+) (.*)\n$/; /^(\d+) (\d+) (.*)\n$/;
my ($mu, $su, $flg) = ($1, $2, $3);
if ($frst) { if ($frst) {
print " [ $mxm, $mms, $mxs,\n ";
$frst = 0; $frst = 0;
} else { } else {
print ", "; print ", ";
} }
print "$mu, $su, \"$flg\""; print "$1, $2, \"$3\"";
} }
print " ],\n"; print " ],\n";
close FILE; close FILE;

Loading…
Cancel
Save