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

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

my $addresses = q:to/END/;
Sleepy Cottage,
123, Badgemore Lane,
Henley-on-Thames,
Oxon,
RG9 2XX
UK

123, Badgemore Lane,
Henley-on-Thames,
Oxon,
RG9 2XX

Sleepy Cottage,
Badgemore Lane,
Henley-on-Thames,
Oxon, RG9 2XX

39 George Street
Dorchester DT0 8QL

69 New Street
Slough
SL22 5ZL

50 High Street
Taunton
TA43 5VW

71 Windsor Road
Ipswich
IP31 1RY

12 Richmond Road
Kirkcaldy
KY34 6CS
Scotland

88 Kingsway
London
WC50 8KD

123 Quick Road
London
W4 2XX
END

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

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

    my $res;

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

done-testing;


