瀏覽代碼

Support spaces in $exe path

Kaloyan Petrov 5 年之前
父節點
當前提交
7f0aadbb84
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tests/keystats

+ 3 - 1
tests/keystats

@@ -12,9 +12,11 @@ sub usage {
 
 
 usage if ((@ARGV == 0) or ($ARGV[0] eq '-h'));
 usage if ((@ARGV == 0) or ($ARGV[0] eq '-h'));
 
 
-my @exes = glob "$FindBin::Bin/keystat.???";
+my @exes = glob "'$FindBin::Bin/keystat.???'";
+
 my %stats;
 my %stats;
 for my $exe (@exes) {
 for my $exe (@exes) {
+    $exe =~ s/\ /\\ /g;
     $stats{$exe} = `$exe @ARGV`;
     $stats{$exe} = `$exe @ARGV`;
     delete $stats{$exe} if ($? != 0); # omit hash functions that fail to produce stats (nx)
     delete $stats{$exe} if ($? != 0); # omit hash functions that fail to produce stats (nx)
 }
 }