Commit 35873031a723e2f04a17c9fce196614bb71278b9
1 parent
b4e7d6ed
Uncompress stream data for some linearization tests
For linearization tests where we are actually comparing the exact output of the test with a known file, uncompress stream data so we can see what's there. This makes looking at future changes a little easier.
Showing
7 changed files
with
9 additions
and
3 deletions
qpdf/qtest/qpdf.test
| ... | ... | @@ -1136,9 +1136,15 @@ foreach my $base (@to_linearize) |
| 1136 | 1136 | foreach my $omode (qw(disable preserve generate)) |
| 1137 | 1137 | { |
| 1138 | 1138 | my $oarg = "-object-streams=$omode"; |
| 1139 | + my $sdarg = ""; | |
| 1140 | + if (($base eq 'lin-special') || ($base eq 'object-stream')) | |
| 1141 | + { | |
| 1142 | + $sdarg = "--stream-data=uncompress"; | |
| 1143 | + } | |
| 1139 | 1144 | $td->runtest("linearize $base ($omode)", |
| 1140 | 1145 | {$td->COMMAND => |
| 1141 | - "qpdf -linearize $oarg --static-id $base.pdf a.pdf"}, | |
| 1146 | + "qpdf -linearize $oarg $sdarg" . | |
| 1147 | + " --static-id $base.pdf a.pdf"}, | |
| 1142 | 1148 | {$td->STRING => "", |
| 1143 | 1149 | $td->EXIT_STATUS => 0}); |
| 1144 | 1150 | $td->runtest("check linearization", |
| ... | ... | @@ -1155,12 +1161,12 @@ foreach my $base (@to_linearize) |
| 1155 | 1161 | # the table values. |
| 1156 | 1162 | $td->runtest("relinearize $base 1", |
| 1157 | 1163 | {$td->COMMAND => |
| 1158 | - "qpdf -linearize --static-id a.pdf b.pdf"}, | |
| 1164 | + "qpdf -linearize $sdarg --static-id a.pdf b.pdf"}, | |
| 1159 | 1165 | {$td->STRING => "", |
| 1160 | 1166 | $td->EXIT_STATUS => 0}); |
| 1161 | 1167 | $td->runtest("relinearize $base 2", |
| 1162 | 1168 | {$td->COMMAND => |
| 1163 | - "qpdf -linearize --static-id b.pdf c.pdf"}, | |
| 1169 | + "qpdf -linearize $sdarg --static-id b.pdf c.pdf"}, | |
| 1164 | 1170 | {$td->STRING => "", |
| 1165 | 1171 | $td->EXIT_STATUS => 0}); |
| 1166 | 1172 | $td->runtest("compare files ($omode)", | ... | ... |
qpdf/qtest/qpdf/lin-special.disable.exp
No preview for this file type
qpdf/qtest/qpdf/lin-special.generate.exp
No preview for this file type
qpdf/qtest/qpdf/lin-special.preserve.exp
No preview for this file type
qpdf/qtest/qpdf/object-stream.disable.exp
No preview for this file type
qpdf/qtest/qpdf/object-stream.generate.exp
No preview for this file type
qpdf/qtest/qpdf/object-stream.preserve.exp
No preview for this file type