Commit fe6771e0e520cd2ec55aee4071356542a4ab8cd2

Authored by Jay Berkenbilt
1 parent 91d8c485

add many new tests to exercise C api

git-svn-id: svn+q:///qpdf/trunk@727 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing 255 changed files with 903 additions and 27 deletions

Too many changes.

To preserve performance only 100 of 255 files are displayed.

@@ -18,8 +18,6 @@ @@ -18,8 +18,6 @@
18 files...ideally we should provide the object number currently being 18 files...ideally we should provide the object number currently being
19 read 19 read
20 20
21 - * Have --check report the version number of the PDF file  
22 -  
23 * See if it is possible to support rewriting a file in place or at 21 * See if it is possible to support rewriting a file in place or at
24 least to detect and block this 22 least to detect and block this
25 23
include/qpdf/QPDF.hh
@@ -39,7 +39,10 @@ class QPDF @@ -39,7 +39,10 @@ class QPDF
39 // lifetime. This method must be called before any methods that 39 // lifetime. This method must be called before any methods that
40 // potentially ask for information about the PDF file are called. 40 // potentially ask for information about the PDF file are called.
41 // Prior to calling this, the only methods that are allowed are 41 // Prior to calling this, the only methods that are allowed are
42 - // those that set parameters. 42 + // those that set parameters. If the input file is not
  43 + // encrypted,either a null password or an empty password can be
  44 + // used. If the file is encrypted, either the user password or
  45 + // the owner password may be supplied.
43 DLL_EXPORT 46 DLL_EXPORT
44 void processFile(char const* filename, char const* password = 0); 47 void processFile(char const* filename, char const* password = 0);
45 48
libqpdf/qpdf-c.cc
@@ -83,11 +83,11 @@ QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf) @@ -83,11 +83,11 @@ QPDF_BOOL qpdf_more_warnings(qpdf_data qpdf)
83 DLL_EXPORT 83 DLL_EXPORT
84 char const* qpdf_next_error(qpdf_data qpdf) 84 char const* qpdf_next_error(qpdf_data qpdf)
85 { 85 {
86 - QTC::TC("qpdf", "qpdf-c called qpdf_next_error");  
87 if (qpdf_more_errors(qpdf)) 86 if (qpdf_more_errors(qpdf))
88 { 87 {
89 qpdf->tmp_string = qpdf->error; 88 qpdf->tmp_string = qpdf->error;
90 qpdf->error.clear(); 89 qpdf->error.clear();
  90 + QTC::TC("qpdf", "qpdf-c qpdf_next_error returned error");
91 return qpdf->tmp_string.c_str(); 91 return qpdf->tmp_string.c_str();
92 } 92 }
93 else 93 else
@@ -99,11 +99,11 @@ char const* qpdf_next_error(qpdf_data qpdf) @@ -99,11 +99,11 @@ char const* qpdf_next_error(qpdf_data qpdf)
99 DLL_EXPORT 99 DLL_EXPORT
100 char const* qpdf_next_warning(qpdf_data qpdf) 100 char const* qpdf_next_warning(qpdf_data qpdf)
101 { 101 {
102 - QTC::TC("qpdf", "qpdf-c called qpdf_next_warning");  
103 if (qpdf_more_warnings(qpdf)) 102 if (qpdf_more_warnings(qpdf))
104 { 103 {
105 qpdf->tmp_string = qpdf->warnings.front(); 104 qpdf->tmp_string = qpdf->warnings.front();
106 qpdf->warnings.pop_front(); 105 qpdf->warnings.pop_front();
  106 + QTC::TC("qpdf", "qpdf-c qpdf_next_warning returned warning");
107 return qpdf->tmp_string.c_str(); 107 return qpdf->tmp_string.c_str();
108 } 108 }
109 else 109 else
qpdf/qpdf-ctest.c
1 #include <qpdf/qpdf-c.h> 1 #include <qpdf/qpdf-c.h>
  2 +#include <stdio.h>
  3 +#include <assert.h>
  4 +#include <stdlib.h>
  5 +#include <string.h>
2 6
3 -int main() 7 +static qpdf_data qpdf = 0;
  8 +
  9 +static void report_errors()
  10 +{
  11 + while (qpdf_more_warnings(qpdf))
  12 + {
  13 + printf("warning: %s\n", qpdf_next_warning(qpdf));
  14 + }
  15 + while (qpdf_more_errors(qpdf))
  16 + {
  17 + printf("error: %s\n", qpdf_next_error(qpdf));
  18 + }
  19 +}
  20 +
  21 +static void test01(char const* infile,
  22 + char const* password,
  23 + char const* outfile)
  24 +{
  25 + qpdf_read(qpdf, infile, password);
  26 + printf("version: %s\n", qpdf_get_pdf_version(qpdf));
  27 + printf("linearized: %d\n", qpdf_is_linearized(qpdf));
  28 + printf("encrypted: %d\n", qpdf_is_encrypted(qpdf));
  29 + if (qpdf_is_encrypted(qpdf))
  30 + {
  31 + printf("user password: %s\n", qpdf_get_user_password(qpdf));
  32 + }
  33 + report_errors();
  34 +}
  35 +
  36 +int main(int argc, char* argv[])
4 { 37 {
  38 + char* whoami = 0;
  39 + char* p = 0;
  40 + int n = 0;
  41 + char const* infile;
  42 + char const* password;
  43 + char const* outfile;
  44 + void (*fn)(char const*, char const*, char const*) = 0;
  45 +
  46 + if ((p = strrchr(argv[0], '/')) != NULL)
  47 + {
  48 + whoami = p + 1;
  49 + }
  50 + else if ((p = strrchr(argv[0], '\\')) != NULL)
  51 + {
  52 + whoami = p + 1;
  53 + }
  54 + else
  55 + {
  56 + whoami = argv[0];
  57 + }
  58 + if (argc != 5)
  59 + {
  60 + fprintf(stderr, "usage: %s n infile password outfile\n", whoami);
  61 + exit(2);
  62 + }
  63 +
  64 + n = atoi(argv[1]);
  65 + infile = argv[2];
  66 + password = argv[3];
  67 + outfile = argv[4];
  68 +
  69 + fn = ((n == 1) ? test01 :
  70 + 0);
  71 +
  72 + if (fn == 0)
  73 + {
  74 + fprintf(stderr, "%s: invalid test number %d\n", whoami, n);
  75 + exit(2);
  76 + }
  77 +
  78 + qpdf = qpdf_init();
  79 + fn(infile, password, outfile);
  80 + qpdf_cleanup(&qpdf);
  81 + assert(qpdf == 0);
  82 +
5 return 0; 83 return 0;
6 } 84 }
qpdf/qpdf.cc
@@ -858,6 +858,8 @@ int main(int argc, char* argv[]) @@ -858,6 +858,8 @@ int main(int argc, char* argv[])
858 std::cout << "checking " << infilename << std::endl; 858 std::cout << "checking " << infilename << std::endl;
859 try 859 try
860 { 860 {
  861 + std::cout << "PDF Version: " << pdf.getPDFVersion()
  862 + << std::endl;
861 ::show_encryption(pdf); 863 ::show_encryption(pdf);
862 if (pdf.isLinearized()) 864 if (pdf.isLinearized())
863 { 865 {
qpdf/qpdf.testcov
@@ -122,8 +122,8 @@ qpdf-c called qpdf_init 0 @@ -122,8 +122,8 @@ qpdf-c called qpdf_init 0
122 qpdf-c called qpdf_cleanup 0 122 qpdf-c called qpdf_cleanup 0
123 qpdf-c called qpdf_more_errors 0 123 qpdf-c called qpdf_more_errors 0
124 qpdf-c called qpdf_more_warnings 0 124 qpdf-c called qpdf_more_warnings 0
125 -qpdf-c called qpdf_next_error 0  
126 -qpdf-c called qpdf_next_warning 0 125 +qpdf-c qpdf_next_error returned error 0
  126 +qpdf-c qpdf_next_warning returned warning 0
127 qpdf-c called qpdf_set_suppress_warnings 0 127 qpdf-c called qpdf_set_suppress_warnings 0
128 qpdf-c called qpdf_set_ignore_xref_streams 0 128 qpdf-c called qpdf_set_ignore_xref_streams 0
129 qpdf-c called qpdf_set_attempt_recovery 0 129 qpdf-c called qpdf_set_attempt_recovery 0
qpdf/qtest/qpdf.test
@@ -159,7 +159,7 @@ for (my $i = 1; $i &lt;= scalar(@badfiles); ++$i) @@ -159,7 +159,7 @@ for (my $i = 1; $i &lt;= scalar(@badfiles); ++$i)
159 show_ntests(); 159 show_ntests();
160 # ---------- 160 # ----------
161 $td->notify("--- Recovery Tests ---"); 161 $td->notify("--- Recovery Tests ---");
162 -$n_tests += @badfiles + 7; 162 +$n_tests += @badfiles + 8;
163 163
164 # Recovery tests. These are mostly after-the-fact -- when recovery 164 # Recovery tests. These are mostly after-the-fact -- when recovery
165 # was implemented, some degree of recovery was possible on many of the 165 # was implemented, some degree of recovery was possible on many of the
@@ -226,6 +226,12 @@ $td-&gt;runtest(&quot;run check on damaged file&quot;, @@ -226,6 +226,12 @@ $td-&gt;runtest(&quot;run check on damaged file&quot;,
226 {$td->FILE => "append-page-content-damaged-check.out", 226 {$td->FILE => "append-page-content-damaged-check.out",
227 $td->EXIT_STATUS => 3}, 227 $td->EXIT_STATUS => 3},
228 $td->NORMALIZE_NEWLINES); 228 $td->NORMALIZE_NEWLINES);
  229 +$td->runtest("check with C API",
  230 + {$td->COMMAND =>
  231 + "qpdf-ctest 1 append-page-content-damaged.pdf '' ''"},
  232 + {$td->FILE => "append-page-content-damaged-c-check.out",
  233 + $td->EXIT_STATUS => 0},
  234 + $td->NORMALIZE_NEWLINES);
229 235
230 show_ntests(); 236 show_ntests();
231 # ---------- 237 # ----------
@@ -346,7 +352,7 @@ for (my $n = 16; $n &lt;= 19; ++$n) @@ -346,7 +352,7 @@ for (my $n = 16; $n &lt;= 19; ++$n)
346 show_ntests(); 352 show_ntests();
347 # ---------- 353 # ----------
348 $td->notify("--- Specific File Tests ---"); 354 $td->notify("--- Specific File Tests ---");
349 -$n_tests += 3; 355 +$n_tests += 4;
350 $n_compare_pdfs += 1; 356 $n_compare_pdfs += 1;
351 357
352 # Special PDF files that caused problems at some point 358 # Special PDF files that caused problems at some point
@@ -356,11 +362,13 @@ $n_compare_pdfs += 1; @@ -356,11 +362,13 @@ $n_compare_pdfs += 1;
356 # happen to test boundary conditions in the LZW decoder. 362 # happen to test boundary conditions in the LZW decoder.
357 $td->runtest("old and complex", 363 $td->runtest("old and complex",
358 {$td->COMMAND => "qpdf --check old-and-complex.pdf"}, 364 {$td->COMMAND => "qpdf --check old-and-complex.pdf"},
359 - {$td->STRING => +("checking old-and-complex.pdf\n" .  
360 - "File is not encrypted\n" .  
361 - "File is not linearized\n" .  
362 - "No errors found\n"),  
363 - $td->EXIT_STATUS => 0}, 365 + {$td->FILE => "old-and-complex-check.out",
  366 + $td->EXIT_STATUS => 0},
  367 + $td->NORMALIZE_NEWLINES);
  368 +$td->runtest("old and complex (C API)",
  369 + {$td->COMMAND => "qpdf-ctest 1 old-and-complex.pdf '' ''"},
  370 + {$td->FILE => "old-and-complex-c-check.out",
  371 + $td->EXIT_STATUS => 0},
364 $td->NORMALIZE_NEWLINES); 372 $td->NORMALIZE_NEWLINES);
365 373
366 $td->runtest("convert to qdf", 374 $td->runtest("convert to qdf",
@@ -534,19 +542,13 @@ check_pdf(&quot;linearized and modified&quot;, @@ -534,19 +542,13 @@ check_pdf(&quot;linearized and modified&quot;,
534 542
535 $td->runtest("check linearized and modified", 543 $td->runtest("check linearized and modified",
536 {$td->COMMAND => "qpdf --check lin-delete-and-reuse.pdf"}, 544 {$td->COMMAND => "qpdf --check lin-delete-and-reuse.pdf"},
537 - {$td->STRING => +("checking lin-delete-and-reuse.pdf\n" .  
538 - "File is not encrypted\n" .  
539 - "File is not linearized\n" .  
540 - "No errors found\n"),  
541 - $td->EXIT_STATUS => 0}, 545 + {$td->FILE => "lin-delete-and-reuse-check.out",
  546 + $td->EXIT_STATUS => 0},
542 $td->NORMALIZE_NEWLINES); 547 $td->NORMALIZE_NEWLINES);
543 $td->runtest("check multiple modifications", 548 $td->runtest("check multiple modifications",
544 {$td->COMMAND => "qpdf --check multiple-mods.pdf"}, 549 {$td->COMMAND => "qpdf --check multiple-mods.pdf"},
545 - {$td->STRING => +("checking multiple-mods.pdf\n" .  
546 - "File is not encrypted\n" .  
547 - "File is not linearized\n" .  
548 - "No errors found\n"),  
549 - $td->EXIT_STATUS => 0}, 550 + {$td->FILE => "multiple-mods-check.out",
  551 + $td->EXIT_STATUS => 0},
550 $td->NORMALIZE_NEWLINES); 552 $td->NORMALIZE_NEWLINES);
551 553
552 foreach my $base (@to_linearize) 554 foreach my $base (@to_linearize)
@@ -812,7 +814,7 @@ my @flags = ([&quot;-qdf&quot;, # 1 @@ -812,7 +814,7 @@ my @flags = ([&quot;-qdf&quot;, # 1
812 "no arguments"], 814 "no arguments"],
813 ); 815 );
814 816
815 -$n_tests += (@files * @flags * 2 * 2); 817 +$n_tests += (@files * @flags * 2 * 3);
816 $n_compare_pdfs += (@files * @flags * 2); 818 $n_compare_pdfs += (@files * @flags * 2);
817 $n_acroread += (@files * @flags * 2); 819 $n_acroread += (@files * @flags * 2);
818 820
@@ -825,6 +827,7 @@ foreach my $file (@files) @@ -825,6 +827,7 @@ foreach my $file (@files)
825 my $n = 0; 827 my $n = 0;
826 my $oflags = "--object-streams=$o"; 828 my $oflags = "--object-streams=$o";
827 my $odescrip = "os:" . substr($o, 0, 1); 829 my $odescrip = "os:" . substr($o, 0, 1);
  830 + my $osuf = ($o eq 'generate' ? "-ogen" : "");
828 foreach my $d (@flags) 831 foreach my $d (@flags)
829 { 832 {
830 my ($flags, $fdescrip) = @$d; 833 my ($flags, $fdescrip) = @$d;
@@ -838,7 +841,13 @@ foreach my $file (@files) @@ -838,7 +841,13 @@ foreach my $file (@files)
838 841
839 $td->runtest("check status", 842 $td->runtest("check status",
840 {$td->COMMAND => "qpdf --check a.pdf"}, 843 {$td->COMMAND => "qpdf --check a.pdf"},
841 - {$td->FILE => "$base.$n.check", 844 + {$td->FILE => "$base.$n$osuf.check",
  845 + $td->EXIT_STATUS => 0},
  846 + $td->NORMALIZE_NEWLINES);
  847 +
  848 + $td->runtest("check with C API",
  849 + {$td->COMMAND => [qw(qpdf-ctest 1 a.pdf), "", ""]},
  850 + {$td->FILE => "$base.$n$osuf.c-check",
842 $td->EXIT_STATUS => 0}, 851 $td->EXIT_STATUS => 0},
843 $td->NORMALIZE_NEWLINES); 852 $td->NORMALIZE_NEWLINES);
844 853
qpdf/qtest/qpdf/U25A0.1-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.1-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/U25A0.1.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.1.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/U25A0.10-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/U25A0.10-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +P = -4
  4 +User password =
  5 +File is not linearized
  6 +No errors found
qpdf/qtest/qpdf/U25A0.10.c-check 0 → 100644
  1 +version: 1.4
  2 +linearized: 0
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/U25A0.10.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.4
2 P = -4 3 P = -4
3 User password = 4 User password =
4 File is not linearized 5 File is not linearized
qpdf/qtest/qpdf/U25A0.11-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 1
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/U25A0.11-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +P = -4
  4 +User password =
  5 +File is linearized
  6 +No errors found
qpdf/qtest/qpdf/U25A0.11.c-check 0 → 100644
  1 +version: 1.4
  2 +linearized: 1
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/U25A0.11.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.4
2 P = -4 3 P = -4
3 User password = 4 User password =
4 File is linearized 5 File is linearized
qpdf/qtest/qpdf/U25A0.12-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/U25A0.12-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +P = -60
  4 +User password =
  5 +File is not linearized
  6 +No errors found
qpdf/qtest/qpdf/U25A0.12.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/U25A0.12.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 P = -60 3 P = -60
3 User password = 4 User password =
4 File is not linearized 5 File is not linearized
qpdf/qtest/qpdf/U25A0.2-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.2-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/U25A0.2.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.2.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/U25A0.3-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.3-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/U25A0.3.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.3.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/U25A0.4-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.4-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/U25A0.4.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.4.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/U25A0.5-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.5-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/U25A0.5.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.5.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/U25A0.6-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.6-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/U25A0.6.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.6.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/U25A0.7-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.7-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/U25A0.7.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.7.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/U25A0.8-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.8-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/U25A0.8.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/U25A0.8.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/U25A0.9-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 1
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/U25A0.9-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +P = -60
  4 +User password =
  5 +File is linearized
  6 +No errors found
qpdf/qtest/qpdf/U25A0.9.c-check 0 → 100644
  1 +version: 1.3
  2 +linearized: 1
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/U25A0.9.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.3
2 P = -60 3 P = -60
3 User password = 4 User password =
4 File is linearized 5 File is linearized
qpdf/qtest/qpdf/append-page-content-damaged-c-check.out 0 → 100644
  1 +WARNING: append-page-content-damaged.pdf: offset 0: file is damaged
  2 +WARNING: append-page-content-damaged.pdf: can't find startxref
  3 +WARNING: Attempting to reconstruct cross-reference table
  4 +version: 1.3
  5 +linearized: 0
  6 +encrypted: 0
  7 +warning: append-page-content-damaged.pdf: offset 0: file is damaged
  8 +warning: append-page-content-damaged.pdf: can't find startxref
  9 +warning: Attempting to reconstruct cross-reference table
qpdf/qtest/qpdf/append-page-content-damaged-check.out
@@ -2,5 +2,6 @@ WARNING: append-page-content-damaged.pdf: offset 0: file is damaged @@ -2,5 +2,6 @@ WARNING: append-page-content-damaged.pdf: offset 0: file is damaged
2 WARNING: append-page-content-damaged.pdf: can't find startxref 2 WARNING: append-page-content-damaged.pdf: can't find startxref
3 WARNING: Attempting to reconstruct cross-reference table 3 WARNING: Attempting to reconstruct cross-reference table
4 checking append-page-content-damaged.pdf 4 checking append-page-content-damaged.pdf
  5 +PDF Version: 1.3
5 File is not encrypted 6 File is not encrypted
6 File is not linearized 7 File is not linearized
qpdf/qtest/qpdf/damaged-stream.out
1 checking damaged-stream.pdf 1 checking damaged-stream.pdf
  2 +PDF Version: 1.3
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 WARNING: damaged-stream.pdf: offset 426: error decoding stream data for object 5 0: LZWDecoder: bad code received 5 WARNING: damaged-stream.pdf: offset 426: error decoding stream data for object 5 0: LZWDecoder: bad code received
qpdf/qtest/qpdf/fax-decode-parms.out
1 checking fax-decode-parms.pdf 1 checking fax-decode-parms.pdf
  2 +PDF Version: 1.4
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.1-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.1-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/hybrid-xref.1.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.1.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.10-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/hybrid-xref.10-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +P = -4
  4 +User password =
  5 +File is not linearized
  6 +No errors found
qpdf/qtest/qpdf/hybrid-xref.10.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/hybrid-xref.10.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 P = -4 3 P = -4
3 User password = 4 User password =
4 File is not linearized 5 File is not linearized
qpdf/qtest/qpdf/hybrid-xref.11-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 1
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/hybrid-xref.11-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +P = -4
  4 +User password =
  5 +File is linearized
  6 +No errors found
qpdf/qtest/qpdf/hybrid-xref.11.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 1
  3 +encrypted: 1
  4 +user password:
qpdf/qtest/qpdf/hybrid-xref.11.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 P = -4 3 P = -4
3 User password = 4 User password =
4 File is linearized 5 File is linearized
qpdf/qtest/qpdf/hybrid-xref.12-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.12-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/hybrid-xref.12.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.12.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.2-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.2-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/hybrid-xref.2.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.2.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.3-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.3-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/hybrid-xref.3.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.3.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.4-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.4-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/hybrid-xref.4.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.4.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.5-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.5-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/hybrid-xref.5.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.5.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.6-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.6-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/hybrid-xref.6.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.6.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.7-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.7-ogen.check 0 → 100644
  1 +checking a.pdf
  2 +PDF Version: 1.5
  3 +File is not encrypted
  4 +File is not linearized
  5 +No errors found
qpdf/qtest/qpdf/hybrid-xref.7.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0
qpdf/qtest/qpdf/hybrid-xref.7.check
1 checking a.pdf 1 checking a.pdf
  2 +PDF Version: 1.5
2 File is not encrypted 3 File is not encrypted
3 File is not linearized 4 File is not linearized
4 No errors found 5 No errors found
qpdf/qtest/qpdf/hybrid-xref.8-ogen.c-check 0 → 100644
  1 +version: 1.5
  2 +linearized: 0
  3 +encrypted: 0