diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2006-02-11 23:55:32 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2006-02-11 23:55:32 +0000 |
commit | a3d041bba9ddbfdf92d43a62ba8355df636d0ce6 (patch) | |
tree | fac3eec6da8cf5e3ad83c47deaa2a663684a1b2c /test/run | |
parent | ed6ce993f126d508cd6a57e2770f8ec82db9cf8b (diff) | |
download | quilt-a3d041bba9ddbfdf92d43a62ba8355df636d0ce6.tar.gz |
- test/run: Avoid warnings with some versions of Perl.
Diffstat (limited to 'test/run')
-rwxr-xr-x | test/run | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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] =~ /^~ /); |