aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf/qtest/many-nulls.test
blob: c3eefa1f611bd34cbf433c3ad7fbc62a49c33c63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env perl
require 5.008;
use warnings;
use strict;

unshift(@INC, '.');
require qpdf_test_helpers;

chdir("qpdf") or die "chdir testdir failed: $!\n";

require TestDriver;

cleanup();

my $td = new TestDriver('many-nulls');

# The output of test_many_nulls is also used in performance testing.
# If it changes, consider whether it should be updated in
# performance-test-files as well. See performance_check at the top of
# the source tree.
$td->runtest("create file with many nulls",
             {$td->COMMAND => "test_many_nulls a.pdf"},
             {$td->STRING => "", $td->EXIT_STATUS => 0},
             $td->NORMALIZE_NEWLINES);
$td->runtest("compare output",
             {$td->FILE => "a.pdf"},
             {$td->FILE => "many-nulls.pdf"},
             $td->NORMALIZE_NEWLINES);
$td->runtest("run check file",
             {$td->COMMAND => "qpdf --check a.pdf"},
             {$td->FILE => "many-nulls.out", $td->EXIT_STATUS => 0},
             $td->NORMALIZE_NEWLINES);
cleanup();
$td->report(3);