From fba6037e3ab538396c58c57f18e1ab0470e0a60d Mon Sep 17 00:00:00 2001 From: Jon Chambers Date: Mon, 10 Aug 2026 11:25:05 -0400 Subject: [PATCH] Add a (failing!) test for Benin numbers that have ten-digit national significant numbers --- .../java/org/whispersystems/textsecuregcm/util/UtilTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/util/UtilTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/util/UtilTest.java index 53f3df301..a5d395e56 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/util/UtilTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/util/UtilTest.java @@ -28,6 +28,7 @@ class UtilTest { private static final String NEW_FORMAT_BENIN_E164_STRING = PhoneNumberUtil.getInstance() .format(PhoneNumberUtil.getInstance().getExampleNumber("BJ"), PhoneNumberUtil.PhoneNumberFormat.E164); private static final String OLD_FORMAT_BENIN_E164_STRING = NEW_FORMAT_BENIN_E164_STRING.replaceFirst("01", ""); + private static final String TEN_DIGIT_NATIONAL_SIGNIFICANT_BENIN_E164 = "+2291234567890"; @ParameterizedTest @MethodSource @@ -42,7 +43,8 @@ class UtilTest { return List.of( Arguments.of(usE164, List.of(usE164)), Arguments.of(NEW_FORMAT_BENIN_E164_STRING, List.of(NEW_FORMAT_BENIN_E164_STRING, OLD_FORMAT_BENIN_E164_STRING)), - Arguments.of(OLD_FORMAT_BENIN_E164_STRING, List.of(OLD_FORMAT_BENIN_E164_STRING, NEW_FORMAT_BENIN_E164_STRING)) + Arguments.of(OLD_FORMAT_BENIN_E164_STRING, List.of(OLD_FORMAT_BENIN_E164_STRING, NEW_FORMAT_BENIN_E164_STRING)), + Arguments.of(TEN_DIGIT_NATIONAL_SIGNIFICANT_BENIN_E164, List.of(TEN_DIGIT_NATIONAL_SIGNIFICANT_BENIN_E164)) ); }