diff options
author | Brian Fraser <fraserbn@gmail.com> | 2011-07-06 14:44:11 -0300 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-06 13:01:13 -0700 |
commit | 472394e48953bb7805fb1dfef59cecc52b821bab (patch) | |
tree | 6ceaf4ee00ad4a06bbeb092569ec6669fdc0271c | |
parent | bf29d05f84d1479fc85ca7522e262bebcb354e97 (diff) | |
download | perl-472394e48953bb7805fb1dfef59cecc52b821bab.tar.gz |
sv.c: Pass in UNI_DISPLAY_ISPRINT in S_not_a_number
-rw-r--r-- | sv.c | 2 | ||||
-rw-r--r-- | t/uni/gv.t | 10 |
2 files changed, 5 insertions, 7 deletions
@@ -1719,7 +1719,7 @@ S_not_a_number(pTHX_ SV *const sv) if (DO_UTF8(sv)) { dsv = newSVpvs_flags("", SVs_TEMP); - pv = sv_uni_display(dsv, sv, 10, 0); + pv = sv_uni_display(dsv, sv, 10, UNI_DISPLAY_ISPRINT); } else { char *d = tmpbuf; const char * const limit = tmpbuf + sizeof(tmpbuf) - 8; diff --git a/t/uni/gv.t b/t/uni/gv.t index 5c6df135c8..f03b7d6b39 100644 --- a/t/uni/gv.t +++ b/t/uni/gv.t @@ -110,8 +110,7 @@ is ($ᕘ, undef); is (scalar @ᕘ, 0); is (scalar %ᕘ, 0); -TODO: { - local $TODO = "sprintf formats might not be clean on globs"; +{ # test warnings from assignment of undef to glob my $msg = ''; local $SIG{__WARN__} = sub { $msg = $_[0] }; @@ -127,19 +126,19 @@ TODO: { foreach ($copy, *SKRÈÈÈ) { $msg = ''; my $victim = sprintf "%d", $_; - like($msg, qr/Argument "\*main::[\p{XIDS}\p{XIDC}]{6}" isn't numeric in sprintf/, + like($msg, qr/Argument "\*main::(\p{ASCII}|\Q\x{\E\p{ASCII_Hex_Digit}{2}\}){3}\Q...\E" isn't numeric in sprintf/, "Warning on conversion to IV"); is($victim, 0); $msg = ''; $victim = sprintf "%u", $_; - like($msg, qr/Argument "\*main::[\p{XIDS}\p{XIDC}]{6}" isn't numeric in sprintf/, + like($msg, qr/Argument "\*main::(\p{ASCII}|\Q\x{\E\p{ASCII_Hex_Digit}{2}\}){3}\Q...\E" isn't numeric in sprintf/, "Warning on conversion to UV"); is($victim, 0); $msg = ''; $victim = sprintf "%e", $_; - like($msg, qr/Argument "\*main::[\p{XIDS}\p{XIDC}]{6}" isn't numeric in sprintf/, + like($msg, qr/Argument "\*main::(\p{ASCII}|\Q\x{\E\p{ASCII_Hex_Digit}{2}\}){3}\Q...\E" isn't numeric in sprintf/, "Warning on conversion to NV"); like($victim, qr/^0\.0+E\+?00/i, "Expect floating point zero"); @@ -545,7 +544,6 @@ format = } } { - local $TODO = "Warnings not yet clean"; eval {ᔅᓗsḨ->맆;}; like ($@, qr/^Can't locate object method "맆"/, "Even with SUPER"); } |