File: viewer-preferences.t

package info (click to toggle)
libpdf-builder-perl 3.027-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,992 kB
  • sloc: perl: 107,532; makefile: 10
file content (21 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
use strict;
use warnings;

use Test::More tests => 3;

use PDF::Builder;

my $pdf = PDF::Builder->new();
$pdf->preferences(-simplex => 1);
like($pdf->to_string(), qr{/ViewerPreferences << [^>]*?/Duplex /Simplex}, q{Duplex => Simplex});

$pdf = PDF::Builder->new();
$pdf->preferences(-duplexfliplongedge => 1);
like($pdf->to_string(), qr{/ViewerPreferences << [^>]*?/Duplex /DuplexFlipLongEdge}, q{Duplex => DuplexFlipLongEdge});

$pdf = PDF::Builder->new();
$pdf->preferences(-duplexflipshortedge => 1);
like($pdf->to_string(), qr{/ViewerPreferences << [^>]*?/Duplex /DuplexFlipShortEdge}, q{Duplex => DuplexFlipShortEdge});

1;