File: acro8.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 (39 lines) | stat: -r--r--r-- 917 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
### -*- mode: perl; -*-

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

use Parse::RecDescent;
use strict;
use warnings;

plan tests => 5;

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

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

ok ((
    $erg->{'Q1.a'} eq '2' and
    $erg->{'Q1.b'} eq '3' and
    $erg->{'Q1.c'} eq '2' and
    $erg->{'Q1.d'} eq 'Yes'
    ),
    "parse");

ok (($fdf->attribute_file eq '/atlas/home/wef/IssuesMapping/Surveys/ME002.pdf'),
    "attribute_file");

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

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

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