qpdf/qpdf/qtest/many-nulls.test

35 lines
1019 B
Perl

#!/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);