#!/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('page-labels');

my $n_tests = 3;

$td->runtest("complex page labels",
             {$td->COMMAND => "test_driver 47 page-labels-num-tree.pdf"},
             {$td->FILE => "page-labels-num-tree.out", $td->EXIT_STATUS => 0},
             $td->NORMALIZE_NEWLINES);
$td->runtest("no zero entry for page labels",
             {$td->COMMAND => "test_driver 47 page-labels-no-zero.pdf"},
             {$td->FILE => "page-labels-no-zero.out", $td->EXIT_STATUS => 0},
             $td->NORMALIZE_NEWLINES);
$td->runtest("no page labels",
             {$td->COMMAND => "test_driver 47 minimal.pdf"},
             {$td->FILE => "no-page-labels.out", $td->EXIT_STATUS => 0},
             $td->NORMALIZE_NEWLINES);

cleanup();
$td->report($n_tests);
