Skip to content

Commit

Permalink
Merge pull request #142 from waterkip/denmark-distinction-ready
Browse files Browse the repository at this point in the history
Be able to validate Denmark's mobile numbers
  • Loading branch information
DrHyde committed May 2, 2024
2 parents 9d7335a + 0edc011 commit cb68774
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build-tests.pl
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
}
}

# Denmark and Chile
if(($IDD_country_code == 45 || $IDD_country_code == 56) && $test_method =~ /
# Chile
if($IDD_country_code == 56 && $test_method =~ /
is_mobile |
is_fixed_line
/x) {
Expand Down
4 changes: 4 additions & 0 deletions t/stubs.t
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ is($ar_obj->format_for_country('+44'), '+54 9 11 2345-6789', '+44 argument treat
my $dk_obj = Number::Phone->new("DK", "+45 38123456");
is($dk_obj->format_using('National'), '38 12 34 56', 'DK national formatting has no prefix');

$dk_obj = Number::Phone->new('DK', '34 20 12 34');
ok(!$dk_obj->is_fixed_line, "DK mobile range in fixed line segment");
ok($dk_obj->is_mobile, "... and is indeed mobile");

use lib 't/lib';

require 'common-stub_and_libphonenumber_tests.pl';
Expand Down

0 comments on commit cb68774

Please sign in to comment.