#!/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('merge-dictionary');

my $n_tests = 3;

$td->runtest("merge dictionary",
             {$td->COMMAND => "test_driver 50 merge-dict.pdf"},
             {$td->FILE => "merge-dict.out", $td->EXIT_STATUS => 0},
             $td->NORMALIZE_NEWLINES);
$td->runtest("unique resource name",
             {$td->COMMAND => "test_driver 60 minimal.pdf"},
             {$td->FILE => "test60.out", $td->EXIT_STATUS => 0},
             $td->NORMALIZE_NEWLINES);
$td->runtest("check output",
             {$td->FILE => "a.pdf"},
             {$td->FILE => "unique-resources.pdf"});

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