aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qtest/qpdfjob-remove-annotations.test
blob: 06f8f07ae32dbbc0ef534a4fff570ba1cad8f8d7 (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
#!/usr/bin/env perl
require 5.008;
use warnings;
use strict;

chdir("qpdfjob-remove-annotations");

require TestDriver;

my $td = new TestDriver('qpdfjob-remove-annotations');

cleanup();

$td->runtest("remove-annotations",
             {$td->COMMAND => "qpdfjob-remove-annotations --static-id annotations.pdf out.pdf"},
             {$td->STRING => "", $td->EXIT_STATUS => 0});
$td->runtest("compare files",
             {$td->COMMAND => "qpdf-test-compare out.pdf annotations-out.pdf"},
             {$td->FILE => "annotations-out.pdf", $td->EXIT_STATUS => 0});

cleanup();

$td->report(2);

sub cleanup
{
    unlink("out.pdf");
}