diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-08-21 09:54:27 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-08-21 15:09:11 -0400 |
commit | 13d235b34eb7fd71ab26afde87d0c43fdcadb1cf (patch) | |
tree | ff3f3874666a41452eb5c6fa6fa1b8e1bf8f515d /t | |
parent | f13c8ddbfb6aa3d08ad6f1ea2a66babf3f782cac (diff) | |
download | perl-13d235b34eb7fd71ab26afde87d0c43fdcadb1cf.tar.gz |
Do not anchor the matches, because of sprintf padding.
Diffstat (limited to 't')
-rw-r--r-- | t/op/sprintf2.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t index 49a9e553d1..bcb7d63ee8 100644 --- a/t/op/sprintf2.t +++ b/t/op/sprintf2.t @@ -588,14 +588,14 @@ for my $t (@hexfloat) { # hexdigits, and see if they differ in value by one. my ($rh, $eh) = ($result, $expected); sub extract_prefix { - ($_[0] =~ s/^(-?0x[0-9a-fA-F]+\.)//) && return $1; + ($_[0] =~ s/(-?0x[0-9a-fA-F]+\.)//) && return $1; } my $rp = extract_prefix($rh); my $ep = extract_prefix($eh); print "# rp = $rp, ep = $ep (rh $rh, eh $eh)\n"; if ($rp eq $ep) { # If prefixes match. sub extract_exponent { - ($_[0] =~ s/([pP][+-]?\d+)$//) && return $1; + ($_[0] =~ s/([pP][+-]?\d+)//) && return $1; } my $re = extract_exponent($rh); my $ee = extract_exponent($eh); |