Skip to content

Commit

Permalink
Update Luxembourg numbers
Browse files Browse the repository at this point in the history
Related to #718, some number ranges were incorrect.
  • Loading branch information
TrevorPilley authored Oct 22, 2024
1 parent ff85acf commit b30340a
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 36 deletions.
7 changes: 4 additions & 3 deletions src/PhoneNumbers/DataFiles/LU.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# - https://www.itu.int/dms_pub/itu-t/oth/02/02/T020200007D0002PDFE.pdf
# - https://assets.ilr.lu/telecom/Documents/ILRLU-1461723625-905.pdf
N|||20000000-20999999,23000000-24999999,26000000-28999999|
N|||2200-2299,22000-22999,220000-229999,2200000-2299999,22000000-22999999,220000000-229999999,2200000000-2299999999,22000000000-22999999999,2500-2599,25000-25999,250000-259999,2500000-2599999,25000000-25999999,250000000-259999999,2500000000-2599999999,25000000000-25999999999,2900-2999,29000-29999,290000-299999,2900000-2999999,29000000-29999999,290000000-299999999,2900000000-2999999999,29000000000-29999999999,3000-5099,30000-50999,300000-509999,3000000-5099999,30000000-50999999,300000000-509999999,3000000000-5099999999,30000000000-50999999999,7000-7099,70000-70999,700000-709999,7000000-7099999,70000000-70999999,700000000-709999999,7000000000-7099999999,70000000000-70999999999,8020-8999,80200-89999,802000-899999,8020000-8999999,80200000-89999999,802000000-899999999,8020000000-8999999999,80200000000-89999999999,9080-9099,90800-90999,908000-909999,9080000-9099999,90800000-90999999,908000000-909999999,9080000000-9099999999,90800000000-90999999999,9200-9599,92000-95999,920000-959999,9200000-9599999,92000000-95999999,920000000-959999999,9200000000-9599999999,92000000000-95999999999,9700-9799,97000-97999,970000-979999,9700000-9799999,97000000-97999999,970000000-979999999,9700000000-9799999999,97000000000-97999999999,9900-9999,99000-99999,990000-999999,9900000-9999999,99000000-99999999,990000000-999999999,9900000000-9999999999,99000000000-99999999999|
M|||600000000000-600299999999,602100000000-602199999999,606100000000-606199999999,606700000000-606799999999|M
M|||621000000-621999999,651000000-651999999,655000000-656999999,661000000-661999999,671000000-671999999,681000000-681999999,691000000-691999999|
N|||2200-2299,22000-22999,220000-229999,2200000-2299999,22000000-22999999,220000000-229999999,2200000000-2299999999,22000000000-22999999999,2500-2599,25000-25999,250000-259999,2500000-2599999,25000000-25999999,250000000-259999999,2500000000-2599999999,25000000000-25999999999,2900-2999,29000-29999,290000-299999,2900000-2999999,29000000-29999999,290000000-299999999,2900000000-2999999999,29000000000-29999999999,3000-5999,30000-59999,300000-599999,3000000-5999999,30000000-59999999,300000000-599999999,3000000000-5999999999,30000000000-59999999999,7000-7999,70000-79999,700000-799999,7000000-7999999,70000000-79999999,700000000-799999999,7000000000-7999999999,70000000000-79999999999,8020-8999,80200-89999,802000-899999,8020000-8999999,80200000-89999999,802000000-899999999,8020000000-8999999999,80200000000-89999999999,9080-9099,90800-90999,908000-909999,9080000-9099999,90800000-90999999,908000000-909999999,9080000000-9099999999,90800000000-90999999999,9200-9599,92000-95999,920000-959999,9200000-9599999,92000000-95999999,920000000-959999999,9200000000-9599999999,92000000000-95999999999,9700-9799,97000-97999,970000-979999,9700000-9799999,97000000-97999999,970000000-979999999,9700000000-9799999999,97000000000-97999999999,9900-9999,99000-99999,990000-999999,9900000-9999999,99000000-99999999,990000000-999999999,9900000000-9999999999,99000000000-99999999999|
N|||600000000000-600299999999,602100000000-602199999999,606100000000-606199999999,606700000000-606799999999|M
M|||621000000-621999999,651000000-651999999,655000000-656999999,661000000-661999999,671000000-671999999,679000000-679999999,681000000-681999999,691000000-691999999|
N|||80000000-80199999|F
N|||90000000-90199999,90500000-90599999|R
N|||12000-12999,1300-1399|
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class DefaultPhoneNumberParserTests_LU_MobilePhoneNumber
[InlineData("661999999", "661999999")]
[InlineData("671000000", "671000000")]
[InlineData("671999999", "671999999")]
[InlineData("679000000", "679000000")]
[InlineData("679999999", "679999999")]
[InlineData("681000000", "681000000")]
[InlineData("681999999", "681999999")]
[InlineData("691000000", "691000000")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ public class DefaultPhoneNumberParserTests_LU_NonGeographicPhoneNumber
private static readonly PhoneNumberParser s_parser = DefaultPhoneNumberParser.Create(CountryInfo.Luxembourg);

[Theory]
[InlineData("1300", "1300")]
[InlineData("1399", "1399")]
[InlineData("2200", "2200")]
[InlineData("2299", "2299")]
[InlineData("2500", "2500")]
[InlineData("2599", "2599")]
[InlineData("2900", "2900")]
[InlineData("2999", "2999")]
[InlineData("3000", "3000")]
[InlineData("5099", "5099")]
[InlineData("5999", "5999")]
[InlineData("7000", "7000")]
[InlineData("7099", "7099")]
[InlineData("7999", "7999")]
[InlineData("8020", "8020")]
[InlineData("8999", "8999")]
[InlineData("9080", "9080")]
Expand All @@ -28,16 +30,18 @@ public class DefaultPhoneNumberParserTests_LU_NonGeographicPhoneNumber
[InlineData("9799", "9799")]
[InlineData("9900", "9900")]
[InlineData("9999", "9999")]
[InlineData("12000", "12000")]
[InlineData("12999", "12999")]
[InlineData("22000", "22000")]
[InlineData("22999", "22999")]
[InlineData("25000", "25000")]
[InlineData("25999", "25999")]
[InlineData("29000", "29000")]
[InlineData("29999", "29999")]
[InlineData("30000", "30000")]
[InlineData("50999", "50999")]
[InlineData("59999", "59999")]
[InlineData("70000", "70000")]
[InlineData("70999", "70999")]
[InlineData("79999", "79999")]
[InlineData("80200", "80200")]
[InlineData("89999", "89999")]
[InlineData("90800", "90800")]
Expand All @@ -55,9 +59,9 @@ public class DefaultPhoneNumberParserTests_LU_NonGeographicPhoneNumber
[InlineData("290000", "290000")]
[InlineData("299999", "299999")]
[InlineData("300000", "300000")]
[InlineData("509999", "509999")]
[InlineData("599999", "599999")]
[InlineData("700000", "700000")]
[InlineData("709999", "709999")]
[InlineData("799999", "799999")]
[InlineData("802000", "802000")]
[InlineData("899999", "899999")]
[InlineData("908000", "908000")]
Expand All @@ -75,9 +79,9 @@ public class DefaultPhoneNumberParserTests_LU_NonGeographicPhoneNumber
[InlineData("2900000", "2900000")]
[InlineData("2999999", "2999999")]
[InlineData("3000000", "3000000")]
[InlineData("5099999", "5099999")]
[InlineData("5999999", "5999999")]
[InlineData("7000000", "7000000")]
[InlineData("7099999", "7099999")]
[InlineData("7999999", "7999999")]
[InlineData("8020000", "8020000")]
[InlineData("8999999", "8999999")]
[InlineData("9080000", "9080000")]
Expand All @@ -101,9 +105,9 @@ public class DefaultPhoneNumberParserTests_LU_NonGeographicPhoneNumber
[InlineData("29000000", "29000000")]
[InlineData("29999999", "29999999")]
[InlineData("30000000", "30000000")]
[InlineData("50999999", "50999999")]
[InlineData("59999999", "59999999")]
[InlineData("70000000", "70000000")]
[InlineData("70999999", "70999999")]
[InlineData("79999999", "79999999")]
[InlineData("80200000", "80200000")]
[InlineData("89999999", "89999999")]
[InlineData("90800000", "90800000")]
Expand All @@ -121,9 +125,9 @@ public class DefaultPhoneNumberParserTests_LU_NonGeographicPhoneNumber
[InlineData("290000000", "290000000")]
[InlineData("299999999", "299999999")]
[InlineData("300000000", "300000000")]
[InlineData("509999999", "509999999")]
[InlineData("599999999", "599999999")]
[InlineData("700000000", "700000000")]
[InlineData("709999999", "709999999")]
[InlineData("799999999", "799999999")]
[InlineData("802000000", "802000000")]
[InlineData("899999999", "899999999")]
[InlineData("908000000", "908000000")]
Expand All @@ -141,9 +145,9 @@ public class DefaultPhoneNumberParserTests_LU_NonGeographicPhoneNumber
[InlineData("2900000000", "2900000000")]
[InlineData("2999999999", "2999999999")]
[InlineData("3000000000", "3000000000")]
[InlineData("5099999999", "5099999999")]
[InlineData("5999999999", "5999999999")]
[InlineData("7000000000", "7000000000")]
[InlineData("7099999999", "7099999999")]
[InlineData("7999999999", "7999999999")]
[InlineData("8020000000", "8020000000")]
[InlineData("8999999999", "8999999999")]
[InlineData("9080000000", "9080000000")]
Expand All @@ -161,9 +165,9 @@ public class DefaultPhoneNumberParserTests_LU_NonGeographicPhoneNumber
[InlineData("29000000000", "29000000000")]
[InlineData("29999999999", "29999999999")]
[InlineData("30000000000", "30000000000")]
[InlineData("50999999999", "50999999999")]
[InlineData("59999999999", "59999999999")]
[InlineData("70000000000", "70000000000")]
[InlineData("70999999999", "70999999999")]
[InlineData("79999999999", "79999999999")]
[InlineData("80200000000", "80200000000")]
[InlineData("89999999999", "89999999999")]
[InlineData("90800000000", "90800000000")]
Expand Down Expand Up @@ -217,6 +221,35 @@ public void Parse_Known_NonGeographicPhoneNumber_Freephone(string value, string
Assert.Equal(subscriberNumber, nonGeographicPhoneNumber.SubscriberNumber);
}

[Theory]
[InlineData("600000000000", "600000000000")]
[InlineData("600299999999", "600299999999")]
[InlineData("602100000000", "602100000000")]
[InlineData("602199999999", "602199999999")]
[InlineData("606100000000", "606100000000")]
[InlineData("606199999999", "606199999999")]
[InlineData("606700000000", "606700000000")]
[InlineData("606799999999", "606799999999")]
public void Parse_Known_NonGeographicPhoneNumber_MachineToMachine(string value, string subscriberNumber)
{
var parseResult = s_parser.Parse(value);
parseResult.ThrowIfFailure();

var phoneNumber = parseResult.PhoneNumber;

Assert.NotNull(phoneNumber);
Assert.IsType<NonGeographicPhoneNumber>(phoneNumber);

var nonGeographicPhoneNumber = (NonGeographicPhoneNumber)phoneNumber;
Assert.Equal(CountryInfo.Luxembourg, nonGeographicPhoneNumber.Country);
Assert.False(nonGeographicPhoneNumber.IsFreephone);
Assert.True(nonGeographicPhoneNumber.IsMachineToMachine);
Assert.False(nonGeographicPhoneNumber.IsPremiumRate);
Assert.False(nonGeographicPhoneNumber.IsSharedCost);
Assert.Null(nonGeographicPhoneNumber.NationalDestinationCode);
Assert.Equal(subscriberNumber, nonGeographicPhoneNumber.SubscriberNumber);
}

[Theory]
[InlineData("90000000", "90000000")]
[InlineData("90199999", "90199999")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ public class DefaultPhoneNumberParserTests_TR_NonGeographicPhoneNumber
private static readonly PhoneNumberParser s_parser = DefaultPhoneNumberParser.Create(CountryInfo.Turkey);

[Theory]
[InlineData("05102000000", "510", "2000000")]
[InlineData("05109999999", "510", "9999999")]
[InlineData("05162000000", "516", "2000000")]
[InlineData("05169999999", "516", "9999999")]
[InlineData("05242000000", "524", "2000000")]
[InlineData("05249999999", "524", "9999999")]
public void Parse_Known_NonGeographicPhoneNumber_5XX_NationalDestinationCode(string value, string NationalDestinationCode, string subscriberNumber)
[InlineData("04440000", "4440000")]
[InlineData("04449999", "4449999")]
public void Parse_Known_NonGeographicPhoneNumber(string value, string subscriberNumber)
{
var parseResult = s_parser.Parse(value);
parseResult.ThrowIfFailure();
Expand All @@ -30,16 +26,18 @@ public void Parse_Known_NonGeographicPhoneNumber_5XX_NationalDestinationCode(str
Assert.False(nonGeographicPhoneNumber.IsMachineToMachine);
Assert.False(nonGeographicPhoneNumber.IsPremiumRate);
Assert.False(nonGeographicPhoneNumber.IsSharedCost);
Assert.Equal(NationalDestinationCode, nonGeographicPhoneNumber.NationalDestinationCode);
Assert.Null(nonGeographicPhoneNumber.NationalDestinationCode);
Assert.Equal(subscriberNumber, nonGeographicPhoneNumber.SubscriberNumber);
}

[Theory]
[InlineData("08110000000", "811", "0000000")]
[InlineData("08119999999", "811", "9999999")]
[InlineData("08120000000", "812", "0000000")]
[InlineData("08129999999", "812", "9999999")]
public void Parse_Known_NonGeographicPhoneNumber_8XX_NationalDestinationCode(string value, string NationalDestinationCode, string subscriberNumber)
[InlineData("05102000000", "510", "2000000")]
[InlineData("05109999999", "510", "9999999")]
[InlineData("05162000000", "516", "2000000")]
[InlineData("05169999999", "516", "9999999")]
[InlineData("05242000000", "524", "2000000")]
[InlineData("05249999999", "524", "9999999")]
public void Parse_Known_NonGeographicPhoneNumber_5XX_NationalDestinationCode(string value, string NationalDestinationCode, string subscriberNumber)
{
var parseResult = s_parser.Parse(value);
parseResult.ThrowIfFailure();
Expand All @@ -60,9 +58,11 @@ public void Parse_Known_NonGeographicPhoneNumber_8XX_NationalDestinationCode(str
}

[Theory]
[InlineData("04440000", "4440000")]
[InlineData("04449999", "4449999")]
public void Parse_Known_NonGeographicPhoneNumber(string value, string subscriberNumber)
[InlineData("08110000000", "811", "0000000")]
[InlineData("08119999999", "811", "9999999")]
[InlineData("08120000000", "812", "0000000")]
[InlineData("08129999999", "812", "9999999")]
public void Parse_Known_NonGeographicPhoneNumber_8XX_NationalDestinationCode(string value, string NationalDestinationCode, string subscriberNumber)
{
var parseResult = s_parser.Parse(value);
parseResult.ThrowIfFailure();
Expand All @@ -78,7 +78,7 @@ public void Parse_Known_NonGeographicPhoneNumber(string value, string subscriber
Assert.False(nonGeographicPhoneNumber.IsMachineToMachine);
Assert.False(nonGeographicPhoneNumber.IsPremiumRate);
Assert.False(nonGeographicPhoneNumber.IsSharedCost);
Assert.Null(nonGeographicPhoneNumber.NationalDestinationCode);
Assert.Equal(NationalDestinationCode, nonGeographicPhoneNumber.NationalDestinationCode);
Assert.Equal(subscriberNumber, nonGeographicPhoneNumber.SubscriberNumber);
}

Expand Down

0 comments on commit b30340a

Please sign in to comment.