File: strange_id_values.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 (43 lines) | stat: -rw-r--r-- 802 bytes parent folder | download | duplicates (4)
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
43
### -*- mode: perl; -*-

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

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

plan tests => 4;

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

# Yet another real world file with xref entries
my $fdf_fname = 't/strange_id_values.fdf';


my $fdf = new PDF::FDF::Simple ({ filename => $fdf_fname });
my $res = $fdf->load;

is (
    $res->{'datClientNameDisplay'},
    'Foobar Group',
    "parse"
   );

is (
    $fdf->attribute_file,
    '/C/Documents and Settings/abc/My Documents/Adobe1.pdf',
    "attribute_file"
   );

ok (
    (grep '(P\306p\363%\257\215@\201\344\231\2142\340M\260)', @{$fdf->attribute_id}),
    "attribute_id 1"
   );

ok (
    (grep '(S\366{?X\2349H\206h\334\276s\244\016\()', @{$fdf->attribute_id}),
    "attribute_id 2"
   );