git.iko.soy/typeable/libphonenumber
on main help sign in
Remove workaround for #1
commita5006a242443fb79a6684f184ad1fd9fcc142766 authormniip <mniip@mniip.com> dateMon 10 Feb 2025, 13:03 (2 years ago) parent08c9b54
1 file changed+3−9
test/Spec.hs+3−9
test/Spec.hs+3−9
@@ -125,15 +125,9 @@ main = hspec $ modifyMaxSuccess (* 10) $ do
125125 prop "returns only ASCII digits" $ \(ParsedNumber _ pn) ->
126126 BSC.all (`elem` ['0'..'9']) $ nationalSignificantNumber pn
127127 modifyMaxDiscardRatio (* 10) $ do
128− prop "concatenated with country code parses to the original (if valid and not MX)" $
129− \(ParsedNumber (_, mReg, ParserInput input) pn) ->
130− -- Apparently "+52112210000000" makes the parser/formatter do weird
131− -- stuff as it tries to handle the deprecated (?) mobile token ("1"
132− -- after "+52")
133− if "5211" `BS.isPrefixOf` normalizeNumber Digits input ||
134− mReg == Just "MX" && "11" `BS.isPrefixOf` normalizeNumber Digits input
135− then discard
136− else isValidNumber Nothing pn ==>
128+ prop "concatenated with country code parses to the original (if valid)" $
129+ \(ParsedNumber _ pn) ->
130+ isValidNumber Nothing pn ==>
137131 let
138132 cc = countryCode pn
139133 nsn = nationalSignificantNumber pn