Commit e80b6e3341243cb86c4ef8ede5241091e29b4504

Authored by Thorsten Schöning
Committed by Jay Berkenbilt
1 parent eff935ab

Support paths with spaces

Showing 1 changed file with 8 additions and 8 deletions
qpdf/qtest/qpdf.test
... ... @@ -2086,15 +2086,15 @@ for (my $large = 0; $large < $nlarge; ++$large)
2086 2086 my $size = ($large ? "large" : "small");
2087 2087 my $file = $large ? "$large_file_test_path/a.pdf" : "a.pdf";
2088 2088 $td->runtest("write test file",
2089   - {$td->COMMAND => "test_large_file write $size $file"},
  2089 + {$td->COMMAND => "test_large_file write $size '$file'"},
2090 2090 {$td->FILE => "large_file.out", $td->EXIT_STATUS => 0},
2091 2091 $td->NORMALIZE_NEWLINES);
2092 2092 $td->runtest("read test file",
2093   - {$td->COMMAND => "test_large_file read $size $file"},
  2093 + {$td->COMMAND => "test_large_file read $size '$file'"},
2094 2094 {$td->FILE => "large_file.out", $td->EXIT_STATUS => 0},
2095 2095 $td->NORMALIZE_NEWLINES);
2096 2096 $td->runtest("check",
2097   - {$td->COMMAND => "qpdf --suppress-recovery --check $file",
  2097 + {$td->COMMAND => "qpdf --suppress-recovery --check '$file'",
2098 2098 $td->FILTER => "grep -v checking"},
2099 2099 {$td->FILE => "large_file-check-normal.out",
2100 2100 $td->EXIT_STATUS => 0},
... ... @@ -2118,11 +2118,11 @@ for (my $large = 0; $large < $nlarge; ++$large)
2118 2118 {$td->COMMAND =>
2119 2119 "qpdf --stream-data=preserve" .
2120 2120 " --object-streams=$omode" .
2121   - " $lin $file $newfile"},
  2121 + " $lin '$file' '$newfile'"},
2122 2122 {$td->STRING => "", $td->EXIT_STATUS => 0});
2123 2123 $td->runtest("read test file",
2124 2124 {$td->COMMAND =>
2125   - "test_large_file read $size $newfile"},
  2125 + "test_large_file read $size '$newfile'"},
2126 2126 {$td->FILE => "large_file.out", $td->EXIT_STATUS => 0},
2127 2127 $td->NORMALIZE_NEWLINES);
2128 2128 my $check_out =
... ... @@ -2135,7 +2135,7 @@ for (my $large = 0; $large < $nlarge; ++$large)
2135 2135 : "large_file-check-normal.out"));
2136 2136 $td->runtest("check: ostream=$ostream, linearize=$linearize",
2137 2137 {$td->COMMAND =>
2138   - "qpdf --suppress-recovery --check $newfile",
  2138 + "qpdf --suppress-recovery --check '$newfile'",
2139 2139 $td->FILTER => "grep -v checking"},
2140 2140 {$td->FILE => $check_out, $td->EXIT_STATUS => 0},
2141 2141 $td->NORMALIZE_NEWLINES);
... ... @@ -2155,10 +2155,10 @@ for (my $large = 0; $large < $nlarge; ++$large)
2155 2155 print F "oops" or die;
2156 2156 close(F);
2157 2157  
2158   - my $cmd = +{$td->COMMAND => "test_large_file read $size $file"};
  2158 + my $cmd = +{$td->COMMAND => "test_large_file read $size '$file'"};
2159 2159 if ($large)
2160 2160 {
2161   - $cmd->{$td->FILTER} = "sed -e s,$large_file_test_path/,,";
  2161 + $cmd->{$td->FILTER} = "sed -e 's,$large_file_test_path/,,'";
2162 2162 }
2163 2163 $td->runtest("reconstruct xref table",
2164 2164 $cmd,
... ...