2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-17 01:55:09 +00:00
qpdf/qpdf/qtest/name-number-trees.test
2022-05-20 09:16:25 -04:00

44 lines
1.3 KiB
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('name-number-trees');
my $n_tests = 6;
$td->runtest("number trees",
{$td->COMMAND => "test_driver 46 number-tree.pdf"},
{$td->FILE => "number-tree.out", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("name trees",
{$td->COMMAND => "test_driver 48 name-tree.pdf"},
{$td->FILE => "name-tree.out", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("nntree split",
{$td->COMMAND => "test_driver 74 split-nntree.pdf"},
{$td->FILE => "split-nntree.out", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check file",
{$td->FILE => "a.pdf"},
{$td->FILE => "split-nntree-out.pdf"});
$td->runtest("nntree erase",
{$td->COMMAND => "test_driver 75 erase-nntree.pdf"},
{$td->FILE => "erase-nntree.out", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check file",
{$td->FILE => "a.pdf"},
{$td->FILE => "erase-nntree-out.pdf"});
cleanup();
$td->report($n_tests);