summaryrefslogtreecommitdiff
path: root/tests/mk-script
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-03-02 13:24:46 +0000
committerJim Meyering <jim@meyering.net>2002-03-02 13:24:46 +0000
commit07b422cb2a4265738f1c7cfc121177e05a3a2b55 (patch)
tree11782404d5b689f9c70f737e616d40a33def3c29 /tests/mk-script
parent558fd5976925c1446a780266c3b532dfd1f73e56 (diff)
downloadcoreutils-07b422cb2a4265738f1c7cfc121177e05a3a2b55.tar.xz
be careful about leading/trailing spaces
Diffstat (limited to 'tests/mk-script')
-rwxr-xr-xtests/mk-script9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/mk-script b/tests/mk-script
index 8995958b1..e524be0b9 100755
--- a/tests/mk-script
+++ b/tests/mk-script
@@ -285,21 +285,24 @@ EOF1
@$env == 1
or die "$program_name: unexpected environment: @$env\n";
$env = $env->[0];
+ my $env_prefix = ($env ? "$env " : '');
if ($via eq 'FILE')
{
- $cmd = "$env \$xx $flags $file_args > $out 2> $err_output";
+ $cmd = "$env_prefix\$xx $flags $file_args > $out 2> $err_output";
}
elsif ($via eq 'PIPE')
{
$via_msg = "|$val" if $val;
$val ||= 'cat';
- $cmd = "$val $file_args | $env \$xx $flags > $out 2> $err_output";
+ $cmd = "$val $file_args | $env_prefix\$xx $flags"
+ . " > $out 2> $err_output";
}
else
{
assert (@srcdir_rel_in_file == 1);
- $cmd = "$env \$xx $flags < $file_args > $out 2> $err_output";
+ $cmd = "$env_prefix\$xx $flags"
+ . " < $file_args > $out 2> $err_output";
}
my $e = $env;