c = *q++; /* c now holds the conversion type */
- if (argsv && strchr("BbcDdiOopuUXx", c)) {
+ if (argsv && strchr("BbcDdiOouUXx", c)) {
/* XXX va_arg(*args) case? need peek, use va_copy? */
SvGETMAGIC(argsv);
if (UNLIKELY(SvAMAGIC(argsv)))
"1.#QNAN", "+1#SNAN", "-1.#NAN", "1#IND", "1.#IND00",
"NAN(123)");
-my @printf_fmt = qw(e f g a d u o i b x p);
+my @printf_fmt = qw(e f g a d u o i b x);
my @packi_fmt = qw(c C s S l L i I n N v V j J w W U);
my @packf_fmt = qw(f d F);
my @packs_fmt = qw(a4 A4 Z5 b20 B20 h10 H10 u);
my @w;
local $SIG{__WARN__} = sub { push @w, $_[0] };
- for my $format (qw(B b c D d i O o p U u X x)) {
+ for my $format (qw(B b c D d i O o U u X x)) {
# skip unportable: j
for my $size (qw(hh h l q L ll t z)) {
for my $num ($NInf, $PInf, $NaN) {
like $@, qr/Missing argument for %n in sprintf/, "%n";
}
+# %p of an Inf or Nan address should still print its address, not
+# 'Inf' etc.
+
+like sprintf("%p", 0+'Inf'), qr/^[0-9a-f]+$/, "%p and Inf";
+like sprintf("%p", 0+'NaN'), qr/^[0-9a-f]+$/, "%p and NaN";
+
done_testing();
set_up_inc('../lib');
}
-plan (tests => 345);
+plan (tests => 343);
use strict;
use warnings;
$dummy=sprintf"%1s",$var; check_count 'sprintf "%1s", $utf8';
$dummy=sprintf"%.1s",$var; check_count 'sprintf "%.1s", $utf8';
-my @fmt = qw(B b c D d i O o p u U X x);
+my @fmt = qw(B b c D d i O o u U X x);
tie $var, "main", 23;
for (@fmt) {