From 963f607c81395f9c8a90cf0bc7600e163951c7a9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 26 Dec 2005 15:54:09 +0000 Subject: [PATCH] don't eat array lead-in on empty arrays --- src/run-tests.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/run-tests.pl b/src/run-tests.pl index 3b7d07b..2e32159 100755 --- a/src/run-tests.pl +++ b/src/run-tests.pl @@ -316,10 +316,10 @@ sub showbox($$) my ($bn) = @_; my ($mu, %ms) = readbox($bn); + print " [ $mu,\n "; my $frst = 1; for my $num (sort {$a <=> $b} keys %ms) { if ($frst) { - print " [ $mu,\n "; $frst = 0; } else { print ", "; @@ -338,18 +338,16 @@ sub showchan() die "Cannot read sync state.\n"; $_ = ; /^1:(\d+) 1:(\d+):(\d+)\n$/; - my ($mxm, $mms, $mxs) = ($1, $2, $3); + print " [ $1, $2, $3,\n "; my $frst = 1; for () { /^(\d+) (\d+) (.*)\n$/; - my ($mu, $su, $flg) = ($1, $2, $3); if ($frst) { - print " [ $mxm, $mms, $mxs,\n "; $frst = 0; } else { print ", "; } - print "$mu, $su, \"$flg\""; + print "$1, $2, \"$3\""; } print " ],\n"; close FILE;