### ----------------------------------------------------
### -- Contact
### -- Licenses: Artistic-2.0
### -- Authors: librasteve
### -- File: t/01-usa.rakutest
### ----------------------------------------------------
use v6.d;
use Test;

use lib '../lib';
use Contact::Address;

my $addresses = q:to/END/;
123, Main St.,
Springfield,
IL 62704,
USA

123, Main St.,
Springfield,
IL 62704

123, Main St.,
Springfield,
IL
62704

405 Union Ave.
Middle Village, NY 11379

47 Nichols St.
West Warwick, RI 02893

916 Oak Valley Ave.
Branford, CT 06405

259 Sleepy Hollow Street
Key West, FL 33040

9340 Golf Lane
Elyria, OH 44035

7 Woodsman Street
Monsey, NY 10952

12 Bank Ave.
West Hempstead, NY 11552

38 Smoky Hollow Street
Oxford, MS 38655

#3 8 East 12th Street
New York
NY
10003
United States ofAmerica

145 Mulberry St
New York, NY 10013-5231
END

my @addresses = $addresses.split(/\n\n+/);

for @addresses -> $address is rw {
    say $address.trim;

    my $res;

    lives-ok {$res = AddressFactory['USA'].new.parse: $address} ,  'lives-ok';
    say $res;
    say '---';
}

done-testing;


