File: fdfparser_newline.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 (41 lines) | stat: -rw-r--r-- 1,113 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
### -*- mode: perl; -*-

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

use Data::Dumper;
use strict;
use warnings;

plan tests => 10;

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

my $testfile = './t/fdfparser_newline.fdf';
my $parser = new PDF::FDF::Simple ({
                                    filename => $testfile,
                                   });

ok ($parser, "setting up");

my $fdf_content_ptr = $parser->load;

ok (($fdf_content_ptr->{'uncomment'} eq ' \ '),
    "parsing newline");
ok (($fdf_content_ptr->{'slash r'} eq 'x
x'),
    "parsing slash r");
ok (($fdf_content_ptr->{'dM'} eq "x\nx"),
    "parsing dM");
ok (($fdf_content_ptr->{'newline n'} eq "xx"),
    "parsing newline n");
ok (($fdf_content_ptr->{'uncomment slash n'} eq 'x\nx'),
    "parsing uncomment slash n");
ok (($fdf_content_ptr->{'uncomment slash r'} eq 'x\rx'),
    "parsing uncomment slash r");
ok (($fdf_content_ptr->{'uncomment dM'} eq 'xx'),
    "parsing uncomment dM");
ok (($fdf_content_ptr->{'slash n'} eq "x\nx"),
    "parsing slash n");
ok (($fdf_content_ptr->{'uncomment newline n'} eq "xx"),
    "uncomment newline n");