summaryrefslogtreecommitdiffstats
path: root/test/run
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-02-11 23:55:32 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-02-11 23:55:32 +0000
commita3d041bba9ddbfdf92d43a62ba8355df636d0ce6 (patch)
treefac3eec6da8cf5e3ad83c47deaa2a663684a1b2c /test/run
parented6ce993f126d508cd6a57e2770f8ec82db9cf8b (diff)
downloadquilt-a3d041bba9ddbfdf92d43a62ba8355df636d0ce6.tar.gz
- test/run: Avoid warnings with some versions of Perl.
Diffstat (limited to 'test/run')
-rwxr-xr-xtest/run7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/run b/test/run
index 4c91ce2..dfe3256 100755
--- a/test/run
+++ b/test/run
@@ -27,9 +27,10 @@ if (isatty(fileno(STDOUT))) {
}
sub exec_test($$);
+sub process_test($$$$);
my ($prog, $in, $out) = ([], [], []);
-my $prog_line;
+my $prog_line = 0;
my ($tests, $failed) = (0,0);
my $lineno;
my $width = ($ENV{COLUMNS} || 80) >> 1;
@@ -38,7 +39,8 @@ for (;;) {
my $line = <>; $lineno++;
if (defined $line) {
# Substitute %VAR and %{VAR} with environment variables.
- $line =~ s[%(?:(\w+)|\{(\w+)\})][$ENV{"$1$2"}]eg;
+ $line =~ s[%(\w+)][$ENV{$1}]eg;
+ $line =~ s[%{(\w+)}][$ENV{$1}]eg;
}
if (defined $line) {
if ($line =~ s/^\s*< ?//) {
@@ -88,7 +90,6 @@ sub process_test($$$$) {
map { s/\s/\\$&/g; $_ } @$p), " -- ";
my $result = exec_test($prog, $in);
my @good = ();
- my $good;
my $nmax = (@$out > @$result) ? @$out : @$result;
for (my $n=0; $n < $nmax; $n++) {
my $use_re = ($out->[$n] =~ /^~ /);