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
|
#!/usr/bin/perl
use FS::Misc::Geo 'standardize';
use Data::Dumper; $Data::Dumper::Terse = 1;
my @tests = (
{
address1 => '6406 Ivy Lane',
address2 => '',
city => 'Greenbelt',
state => 'MD',
zip => '',
},
{
address1 => '8 Wildwood Drive',
address2 => '',
city => 'Old Lyme',
state => 'CT',
zip => '06371',
},
);
my ($userid, $password) = @ARGV;
my %opt = (
userid => $userid,
password=> $password,
test => 1,
);
my $i = 1;
foreach (@tests) {
print "Test $i\n";
my $result = eval { standardize($_, %opt) };
print "ERROR: $@\n\n" if $@;
print Dumper($result);
$i++;
}
1;
|