Output C test n done at the end of each qpdf-ctest

This commit is contained in:
Jay Berkenbilt 2021-12-16 15:06:04 -05:00
parent 9bb6f570ec
commit 4024953682
139 changed files with 159 additions and 17 deletions

View File

@ -1152,6 +1152,7 @@ int main(int argc, char* argv[])
fn(infile, password, outfile, xarg);
qpdf_cleanup(&qpdf);
assert(qpdf == 0);
printf("C test %d done\n", n);
return 0;
}

View File

@ -1452,7 +1452,7 @@ $td->runtest("check version",
unlink "a.pdf", "b.pdf" or die;
$td->runtest("C API: min/force versions",
{$td->COMMAND => "qpdf-ctest 14 object-stream.pdf '' a.pdf b.pdf"},
{$td->STRING => "",
{$td->STRING => "C test 14 done\n",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("C check version 1",
@ -2049,7 +2049,7 @@ foreach my $d (
$td->runtest("newline before endstream (C)",
{$td->COMMAND =>
"qpdf-ctest 22 streams-with-newlines.pdf '' a.pdf"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 22 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check output",
{$td->FILE => "a.pdf"},
@ -2949,7 +2949,7 @@ foreach my $l (qw(none generalized specialized all))
# C API
$td->runtest("image-streams: C",
{$td->COMMAND => "qpdf-ctest 20 image-streams.pdf '' a.pdf"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 20 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check image-streams: C",
{$td->COMMAND => "test_driver 39 a.pdf"},
@ -3043,7 +3043,8 @@ $td->runtest("check output",
$td->runtest("keep unused objects (C)",
{$td->COMMAND =>
"qpdf-ctest 21 unreferenced-objects.pdf '' a.pdf"},
{$td->STRING => "", $td->EXIT_STATUS => 0});
{$td->STRING => "C test 21 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check output",
{$td->FILE => "a.pdf"},
{$td->FILE => "unreferenced-preserved.pdf"});
@ -3413,7 +3414,8 @@ foreach my $d (@capi)
$outfile = "c-$outfile.pdf";
$td->runtest($description,
{$td->COMMAND => "qpdf-ctest $n hybrid-xref.pdf '' a.pdf"},
{$td->STRING => "", $td->EXIT_STATUS => 0});
{$td->STRING => "C test $n done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check $description",
{$td->FILE => "a.pdf"},
{$td->FILE => $outfile});
@ -3472,8 +3474,9 @@ $td->runtest("deterministic ID with encryption",
$td->runtest("deterministic ID (C API)",
{$td->COMMAND =>
"qpdf-ctest 19 deterministic-id-in.pdf '' a.pdf"},
{$td->STRING => "",
$td->EXIT_STATUS => 0});
{$td->STRING => "C test 19 done\n",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("compare files",
{$td->FILE => "a.pdf"},
{$td->FILE => "deterministic-id-nn.pdf"});
@ -4275,7 +4278,8 @@ foreach my $d (@cenc)
my $check_outfile = "c-$outfile.out";
$td->runtest("C API encryption: $description",
{$td->COMMAND => "qpdf-ctest $n $infile $pass a.pdf"},
{$td->STRING => $output, $td->EXIT_STATUS => 0},
{$td->STRING => $output . "C test $n done\n",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
if (-f $pdf_outfile)
{
@ -4825,7 +4829,7 @@ $td->runtest("check output",
$td->runtest("C check object handle creation",
{$td->COMMAND => "qpdf-ctest 25 minimal.pdf '' a.pdf"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 25 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check output",
{$td->FILE => 'a.pdf'},
@ -4833,7 +4837,7 @@ $td->runtest("check output",
$td->runtest("C indirect objects",
{$td->COMMAND => "qpdf-ctest 33 minimal.pdf '' a.pdf"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 33 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check output",
{$td->FILE => 'a.pdf'},
@ -4841,15 +4845,15 @@ $td->runtest("check output",
$td->runtest("C uninitialized objects",
{$td->COMMAND => "qpdf-ctest 26 '' '' ''"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 26 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("C string with embedded null",
{$td->COMMAND => "qpdf-ctest 27 '' '' ''"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 27 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("C wrap and clone objects",
{$td->COMMAND => "qpdf-ctest 28 minimal.pdf '' ''"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 28 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("C object handle errors",
{$td->COMMAND => "qpdf-ctest 29 minimal.pdf '' ''"},
@ -4865,7 +4869,7 @@ $td->runtest("C type mismatch warning",
$td->NORMALIZE_NEWLINES);
$td->runtest("C get object by ID",
{$td->COMMAND => "qpdf-ctest 32 minimal.pdf '' ''"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 32 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
show_ntests();
@ -4876,7 +4880,7 @@ $n_tests += 5;
$td->runtest("C page normal",
{$td->COMMAND =>
"qpdf-ctest 34 11-pages.pdf '' a.pdf minimal.pdf"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 34 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check output",
{$td->FILE => 'a.pdf'},
@ -4890,12 +4894,12 @@ $td->runtest("C page errors",
$td->runtest("C inherited page resources",
{$td->COMMAND =>
"qpdf-ctest 36 inherited-rotate.pdf '' ''"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 36 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("C pages cache",
{$td->COMMAND =>
"qpdf-ctest 37 11-pages.pdf '' ''"},
{$td->STRING => "", $td->EXIT_STATUS => 0},
{$td->STRING => "C test 37 done\n", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
show_ntests();

View File

@ -19,3 +19,4 @@ warning: append-page-content-damaged.pdf: Attempting to reconstruct cross-refere
file: append-page-content-damaged.pdf
pos : 0
text: Attempting to reconstruct cross-reference table
C test 1 done

View File

@ -1 +1,2 @@
status: 0
C test 23 done

View File

@ -17,3 +17,4 @@ warning: c-check-warn-in.pdf: Attempting to reconstruct cross-reference table
file: c-check-warn-in.pdf
pos : 0
text: Attempting to reconstruct cross-reference table
C test 23 done

View File

@ -4,3 +4,4 @@ Info key /Creator: (null)
Info key /Author: Mr. Potato Head
Info key /Producer: QPDF library
Info key /Creator: (null)
C test 16 done

View File

@ -4,3 +4,4 @@ Info key /Creator: A. Nony Mous
Info key /Author: Mr. Potato Head
Info key /Producer: QPDF library
Info key /Creator: (null)
C test 16 done

View File

@ -3,3 +3,4 @@ error: enc-R2,V1,U=view,O=view.pdf: invalid password
file: enc-R2,V1,U=view,O=view.pdf
pos : 0
text: invalid password
C test 2 done

View File

@ -2,3 +2,4 @@ version: 1.7
extension level: 8
linearized: 0
encrypted: 0
C test 1 done

View File

@ -3,3 +3,4 @@ error: bad33.pdf (offset 1771): xref not found
file: bad33.pdf
pos : 1771
text: xref not found
C test 10 done

View File

@ -15,3 +15,4 @@ warning: minimal.pdf: C API object handle accessor errors occurred, and the appl
file: minimal.pdf
pos : 0
text: C API object handle accessor errors occurred, and the application did not define an error handler
C test 24 done

View File

@ -53,3 +53,4 @@ dictionary type mismatch: operation for dictionary attempted on object of type i
file:
pos : 0
text: operation for dictionary attempted on object of type integer: returning false for a key containment request
C test 29 done

View File

@ -6,3 +6,4 @@ warning: object 27 0: operation for dictionary attempted on object of type null:
file:
pos : 0
text: operation for dictionary attempted on object of type null: ignoring key replacement request
C test 35 done

View File

@ -23,3 +23,4 @@ error: bad1.pdf: unable to find trailer dictionary while recovering damaged file
file: bad1.pdf
pos : 0
text: unable to find trailer dictionary while recovering damaged file
C test 2 done

View File

@ -1 +1,2 @@
WARNING: minimal.pdf, trailer at offset 715: operation for integer attempted on object of type dictionary: returning 0
C test 31 done

View File

@ -3,3 +3,4 @@ WARNING: bad1.pdf: file is damaged
WARNING: bad1.pdf: can't find startxref
WARNING: bad1.pdf: Attempting to reconstruct cross-reference table
WARNING: application did not handle error: bad1.pdf: unable to find trailer dictionary while recovering damaged file
C test 30 done

View File

@ -13,3 +13,4 @@ warning: append-page-content-damaged.pdf: Attempting to reconstruct cross-refere
file: append-page-content-damaged.pdf
pos : 0
text: Attempting to reconstruct cross-reference table
C test 2 done

View File

@ -18,3 +18,4 @@ warning: bad33.pdf (offset 629): stream filter type is not name or array
file: bad33.pdf
pos : 629
text: stream filter type is not name or array
C test 2 done

View File

@ -8,3 +8,4 @@ warning: damaged-stream.pdf (offset 426): stream will be re-processed without fi
file: damaged-stream.pdf
pos : 426
text: stream will be re-processed without filtering to avoid data loss
C test 2 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 1
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 1
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 1
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.2
linearized: 1
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.3
linearized: 0
encrypted: 0
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -11,3 +11,4 @@ modify forms: 1
modify annotations: 1
modify other: 1
modify anything: 1
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.3
linearized: 0
encrypted: 0
C test 1 done

View File

@ -1,3 +1,4 @@
version: 1.5
linearized: 0
encrypted: 0
C test 1 done

Some files were not shown because too many files have changed in this diff Show More