File: 07-quoted.t

package info (click to toggle)
libtext-vcard-perl 3.06-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 352 kB
  • ctags: 110
  • sloc: perl: 1,535; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 561 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
#!/usr/bin/perl -w

use strict;

use lib qw(./lib);

use Test::More tests => 3;

BEGIN { use_ok('Text::vCard::Addressbook'); }

my $address_book
    = Text::vCard::Addressbook->new( { 'source_file' => 't/quoted.vcf', } );

ok( $address_book, "Got an address book object" );

foreach my $vcard ( $address_book->vcards() ) {
    my $addresses = $vcard->get( { 'node_type' => 'ADR' } );
    foreach my $address ( @{$addresses} ) {
        is( $address->street(),
            'A street on a quoted line',
            'Got full (quoted address)'
        );
    }
}