Commit a60eb552d37896bceabc1e5def40337df8ba21e7

Authored by Jay Berkenbilt
1 parent ad0e29a3

Split bug tests into separate chunk

Showing 1 changed file with 19 additions and 16 deletions
qpdf/qtest/qpdf.test
... ... @@ -205,21 +205,9 @@ $td->runtest("remove page we don't have",
205 205 $td->NORMALIZE_NEWLINES);
206 206 show_ntests();
207 207 # ----------
208   -$td->notify("--- Miscellaneous Tests ---");
209   -$n_tests += 95;
210   -
211   -$td->runtest("qpdf version",
212   - {$td->COMMAND => "qpdf --version"},
213   - {$td->REGEXP => "qpdf version \\S+\n.*", $td->EXIT_STATUS => 0},
214   - $td->NORMALIZE_NEWLINES);
215   -$td->runtest("C API: qpdf version",
216   - {$td->COMMAND => "qpdf-ctest --version"},
217   - {$td->REGEXP => "qpdf-ctest version \\S+\n",
218   - $td->EXIT_STATUS => 0},
219   - $td->NORMALIZE_NEWLINES);
220   -
221   -# Files to reproduce various bugs
222   -foreach my $d (
  208 +$td->notify("--- Files for specific bugs ---");
  209 +# The number is the github issue number in which the bug was reported.
  210 +my @bug_tests = (
223 211 ["51", "resolve loop", 3],
224 212 ["99", "object 0", 2],
225 213 ["99b", "object 0", 2],
... ... @@ -230,7 +218,9 @@ foreach my $d (
230 218 ["119", "other infinite loop", 3],
231 219 ["120", "other infinite loop", 3],
232 220 ["106", "zlib data error", 3],
233   - )
  221 + );
  222 +$n_tests += scalar(@bug_tests);
  223 +foreach my $d (@bug_tests)
234 224 {
235 225 my ($n, $description, $exit_status) = @$d;
236 226 $td->runtest($description,
... ... @@ -239,7 +229,20 @@ foreach my $d (
239 229 $td->EXIT_STATUS => $exit_status},
240 230 $td->NORMALIZE_NEWLINES);
241 231 }
  232 +show_ntests();
  233 +# ----------
  234 +$td->notify("--- Miscellaneous Tests ---");
  235 +$n_tests += 85;
242 236  
  237 +$td->runtest("qpdf version",
  238 + {$td->COMMAND => "qpdf --version"},
  239 + {$td->REGEXP => "qpdf version \\S+\n.*", $td->EXIT_STATUS => 0},
  240 + $td->NORMALIZE_NEWLINES);
  241 +$td->runtest("C API: qpdf version",
  242 + {$td->COMMAND => "qpdf-ctest --version"},
  243 + {$td->REGEXP => "qpdf-ctest version \\S+\n",
  244 + $td->EXIT_STATUS => 0},
  245 + $td->NORMALIZE_NEWLINES);
243 246  
244 247 foreach (my $i = 1; $i <= 3; ++$i)
245 248 {
... ...