Commit ce714ac9b87b6fa877e3f81e7eb2357f4170021c

Authored by Jay Berkenbilt
1 parent fa3051d9

Call cleanup between test sections

Showing 1 changed file with 4 additions and 0 deletions
qpdf/qtest/qpdf.test
@@ -1041,6 +1041,7 @@ show_ntests(); @@ -1041,6 +1041,7 @@ show_ntests();
1041 $td->notify("--- Overwrite self ---"); 1041 $td->notify("--- Overwrite self ---");
1042 $n_tests += 1; 1042 $n_tests += 1;
1043 1043
  1044 +copy("minimal.pdf", "a.pdf");
1044 $td->runtest("don't overwrite self", 1045 $td->runtest("don't overwrite self",
1045 {$td->COMMAND => "(echo a.pdf; echo a.pdf) | qpdf \@-"}, 1046 {$td->COMMAND => "(echo a.pdf; echo a.pdf) | qpdf \@-"},
1046 {$td->REGEXP => "input file and output file are the same.*", 1047 {$td->REGEXP => "input file and output file are the same.*",
@@ -3178,6 +3179,9 @@ sub show_ntests @@ -3178,6 +3179,9 @@ sub show_ntests
3178 { 3179 {
3179 $td->emphasize("tests so far: ". calc_ntests()); 3180 $td->emphasize("tests so far: ". calc_ntests());
3180 } 3181 }
  3182 + # Calling cleanup here helps to ensure that sections of the test
  3183 + # suite are isolated.
  3184 + cleanup();
3181 } 3185 }
3182 3186
3183 sub bash_completion 3187 sub bash_completion