diff --git a/S32-str/parse-base.t b/S32-str/parse-base.t index 3d42b92a18..afc400e3b6 100644 --- a/S32-str/parse-base.t +++ b/S32-str/parse-base.t @@ -1,7 +1,7 @@ use v6; use Test; -plan 51 * 2; +plan 55 * 2; constant $fancy-nums = '໕໖໗۶۷៤៥123'; constant $fancy-nums-value = 5676745123; @@ -29,6 +29,11 @@ for &parse-base, Str.^lookup('parse-base') -> &pb { 'can parse − sign (fancy Unicode minus)' ~ $t; is-deeply pb( '+FF', 16), 255, 'can parse + sign'; + is-deeply pb( '.42', 10), .42, 'fractional without whole part'; + is-deeply pb('+.42', 10), .42, 'fractional without whole part with +'; + is-deeply pb('-.42', 10), -.42, 'fractional without whole part with -'; + is-deeply pb('−.42', 10), -.42, 'fractional without whole part with U+2212'; + #?rakudo.jvm todo 'Invalid base-10 character' is-deeply pb($fancy-nums, 10), $fancy-nums-value, 'can parse fancy Unicode numerals as Int' ~ $t;