summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-05-25 15:02:20 +0200
committerRichard Levitte <levitte@openssl.org>2016-05-27 17:41:32 +0200
commit04b7805a8686d33186ca9e0571355e7fa2ef2d86 (patch)
tree71e306eb9af5191d21f8773b73cc99c662bb95de
parentcb66390857fe9477e567f163302b4e34aeff8e6e (diff)
downloadopenssl-new-04b7805a8686d33186ca9e0571355e7fa2ef2d86.tar.gz
perl glob: make sure to put quotes around the pattern, in case of spaces
RT#4486 Reviewed-by: Matt Caswell <matt@openssl.org>
-rw-r--r--test/recipes/80-test_ssl_new.t2
-rw-r--r--test/run_tests.pl4
-rw-r--r--util/process_docs.pl4
3 files changed, 5 insertions, 5 deletions
diff --git a/test/recipes/80-test_ssl_new.t b/test/recipes/80-test_ssl_new.t
index 5cafb9fdfd..07f1291f69 100644
--- a/test/recipes/80-test_ssl_new.t
+++ b/test/recipes/80-test_ssl_new.t
@@ -20,7 +20,7 @@ setup("test_ssl_new");
$ENV{TEST_CERTS_DIR} = srctop_dir("test", "certs");
-my @conf_srcs = glob(srctop_file("test", "ssl-tests", "*.conf.in"));
+my @conf_srcs = glob('"'.srctop_file("test", "ssl-tests", "*.conf.in").'"');
map { s/;.*// } @conf_srcs if $^O eq "VMS";
my @conf_files = map { basename($_) } @conf_srcs;
map { s/\.in// } @conf_files;
diff --git a/test/run_tests.pl b/test/run_tests.pl
index 158eaf9bab..6ce1521a75 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -42,13 +42,13 @@ my $list_mode = scalar(grep /^list$/, @tests) != 0;
if (grep /^(alltests|list)$/, @tests) {
@tests = grep {
basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/
- } glob(catfile($recipesdir,"*.t"));
+ } glob('"'.catfile($recipesdir,"*.t").'"');
} else {
my @t = ();
foreach (@tests) {
push @t, grep {
basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/
- } glob(catfile($recipesdir,"*-$_.t"));
+ } glob('"'.catfile($recipesdir,"*-$_.t").'"');
}
@tests = @t;
}
diff --git a/util/process_docs.pl b/util/process_docs.pl
index c2c35ee1c5..efc4ef5361 100644
--- a/util/process_docs.pl
+++ b/util/process_docs.pl
@@ -72,9 +72,9 @@ my $symlink_exists = eval { symlink("",""); 1 };
foreach my $subdir (keys %{$options{subdir}}) {
my $section = $options{subdir}->{$subdir};
my $podsourcedir = catfile($options{sourcedir}, $subdir);
- my $podglob = catfile($podsourcedir, "*.pod");
+ my $podglob = '"'.catfile($podsourcedir, "*.pod").'"';
- foreach my $podfile (glob "$podglob") {
+ foreach my $podfile (glob $podglob) {
my $podname = basename($podfile, ".pod");
my $podpath = catfile($podfile);
my %podinfo = ( section => $section );