File: attribs.t

package info (click to toggle)
libpdf-fdf-simple-perl 0.21-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,012 kB
  • sloc: perl: 15,109; makefile: 7
file content (42 lines) | stat: -r--r--r-- 953 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
### -*- mode: perl; -*-

use Test::More;

use PDF::FDF::Simple;
use File::Temp qw( tempfile );

use Data::Dumper;
use Parse::RecDescent;
use strict;
use warnings;

plan tests => 5;

################## tests ##################


my $fdf_fname = 't/hundev1.fdf';
my $fdf = new PDF::FDF::Simple ({
                                 'filename' => $fdf_fname,
                                });
my $erg = $fdf->load;

ok (($erg->{'Zu- und Vorname'} eq 'Steffen Schwigon' and
     $erg->{'PLZ'} eq '01159' and
     $erg->{'Anschrift Behrde'} eq "Hundeanstalt\rGroraum DD"),
    "parse");

is ($fdf->attribute_file,
    'hundev1.pdf',
    "attribute_file");

is ($fdf->attribute_ufile,
    '/atlas/home/wef/IssuesMapping/Surveys/ME002.pdf',
    "attribute_ufile");

ok ((grep '<ece53a3b05e57db38ed6f01c29a13ced>', @{$fdf->attribute_id}),
    "attribute_id 1");

ok ((grep '<54034b0e4698f348e8b2a91d70e5736b>', @{$fdf->attribute_id}),
    "attribute_id 2");