File: no_header.t

package info (click to toggle)
libpdf-fdf-simple-perl 0.21-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,004 kB
  • sloc: perl: 15,109; makefile: 7
file content (34 lines) | stat: -rw-r--r-- 821 bytes parent folder | download | duplicates (5)
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
### -*- mode: perl; -*-

use PDF::FDF::Simple;
use Test::More;

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

plan tests => 4;

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

my $fdf_fname = 't/hunde_no_header.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");

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

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

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