aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-02-02 02:35:15 +0100
committerJay Berkenbilt <ejb@ql.org>2019-02-02 04:25:25 +0100
commit8acf636b4e525169a7f52160ce1a5423be762271 (patch)
tree084809f1558da02f21af80e180ab0fef1346cc02 /qpdf
parentd491ed875347be9f5b5dce27dd28f28b382ca9ab (diff)
downloadqpdf-8acf636b4e525169a7f52160ce1a5423be762271.tar.zst
Incorporate improved Windows fragility workaround from qtest
Diffstat (limited to 'qpdf')
-rw-r--r--qpdf/qtest/qpdf.test32
1 files changed, 3 insertions, 29 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index b21ffcd6..af103201 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -3724,36 +3724,10 @@ foreach my $file (@files)
{$td->STRING => "",
$td->EXIT_STATUS => 0});
- # This test is fragile on Windows for unknown reasons.
- # Sometimes the output of qpdf --check is truncated yet
- # qpdf --check still exits normally. As a workaround, try
- # writing the output of qpdf --check to a file and test
- # for truncation. If we get a non-truncated output, use
- # that output as the test input. If this loop fails to
- # produce a non-truncated output, the truncated or
- # otherwise incorrect output will still be used as the
- # test input, so the test will fail as it should. We lose
- # a check of qpdf --check's output, but it's not important
- # for this test to verify that.
- unlink "check.tmpout";
- for (my $i = 0; $i < 5; ++$i)
- {
- if ((system("qpdf --check a.pdf > check.tmpout") == 0) &&
- open(F, "<check.tmpout"))
- {
- local $/ = undef;
- my $text = <F>;
- close(F);
- if ($text =~ m/No syntax or stream/)
- {
- last;
- }
- }
- sleep 1;
- }
$td->runtest("check status",
- {$td->FILE => "check.tmpout"},
- {$td->FILE => "$base.$n$osuf.check"},
+ {$td->COMMAND => "qpdf --check a.pdf"},
+ {$td->FILE => "$base.$n$osuf.check",
+ $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check with C API",