Re: [perl #23463]: compiler version on sparc/netbsd
[p5sagit/p5-mst-13.2.git] / t / op / sprintf.t
index 01b36fe..60771a3 100755 (executable)
@@ -104,7 +104,7 @@ for ($i = 1; @tests; $i++) {
     }
 }
 
-# In each of the the following lines, there are three required fields:
+# In each of the following lines, there are three required fields:
 # printf template, data to be formatted (as a Perl expression), and
 # expected result of formatting.  An optional fourth field can contain
 # a comment.  Each field is delimited by a starting '>' and a
@@ -236,6 +236,8 @@ __END__
 >%#e<       >-1234.875<   >-1.234875e+03<
 >%.0e<      >1234.875<    >1e+03<
 >%#.0e<     >1234.875<    >1.e+03<
+>%.0e<      >1.875<       >2e+00<
+>%.0e<      >0.875<       >9e-01<
 >%.*e<      >[0, 1234.875]< >1e+03<
 >%.1e<      >1234.875<    >1.2e+03<
 >%-12.4e<   >1234.875<    >1.2349e+03  <
@@ -265,10 +267,14 @@ __END__
 >%.0f<      >0<           >0<
 >%.0f<      >2**38<       >274877906944<   >Should have exact int'l rep'n<
 >%.0f<      >0.1<         >0<
->%.0f<      >0.6<         >1<              >Known to fail with sfio and (irix|nonstop-ux|powerux)<
->%.0f<      >-0.6<        >-1<             >Known to fail with sfio and (irix|nonstop-ux|powerux)<
+>%.0f<      >0.6<         >1<              >Known to fail with sfio, (irix|nonstop-ux|powerux); -DHAS_LDBL_SPRINTF_BUG may fix<
+>%.0f<      >-0.6<        >-1<             >Known to fail with sfio, (irix|nonstop-ux|powerux); -DHAS_LDBL_SPRINTF_BUG may fix<
+>%.0f<      >1.6<         >2<
+>%.0f<      >-1.6<        >-2<
 >%.0f<      >1<           >1<
 >%#.0f<     >1<           >1.<
+>%.0lf<     >1<           >1<              >'l' should have no effect<
+>%.0hf<     >1<           >%.0hf INVALID<  >'h' should be rejected<
 >%g<        >12345.6789<  >12345.7<
 >%+g<       >12345.6789<  >+12345.7<
 >%#g<       >12345.6789<  >12345.7<
@@ -353,7 +359,7 @@ __END__
 >%2$d %d %d<   >[12, 34]<      >34 12 34<
 >%3$d %d %d<   >[12, 34, 56]<  >56 12 34<
 >%2$*3$d %d<   >[12, 34, 3]<   > 34 12<
->%*3$2$d %d<   >[12, 34, 3]<   >%*3$2$d 34 INVALID<
+>%*3$2$d %d<   >[12, 34, 3]<   >%*3$2$d 12 INVALID<
 >%2$d<         >12<    >0 UNINIT<
 >%0$d<         >12<    >%0$d INVALID<
 >%1$$d<                >12<    >%1$$d INVALID<
@@ -361,3 +367,17 @@ __END__
 >%*2$*2$d<     >[12, 3]<       >%*2$*2$d INVALID<
 >%*2*2$d<      >[12, 3]<       >%*2*2$d INVALID<
 >%0v2.2d<      >''<    ><
+>%vc,%d<       >[63, 64, 65]<  >?,64<
+>%vd,%d<       >[1, 2, 3]<     >49,2<
+>%vf,%d<       >[1, 2, 3]<     >1.000000,2<
+>%vp<  >''<    >%vp INVALID<
+>%vs,%d<       >[1, 2, 3]<     >1,2<
+>%v_<  >''<    >%v_ INVALID<
+>%v#x< >''<    >%v#x INVALID<
+>%v02x<        >"foo\012"<     >66.6f.6f.0a<
+>%V-%s<                >["Hello"]<     >%V-Hello INVALID<
+>%K %d %d<     >[13, 29]<      >%K 13 29 INVALID<
+>%*.*K %d<     >[13, 29, 76]<  >%*.*K 13 INVALID<
+>%4$K %d<      >[45, 67]<      >%4$K 45 INVALID<
+>%d %K %d<     >[23, 45]<      >23 %K 45 INVALID<
+>%*v*999\$d %d %d<     >[11, 22, 33]<  >%*v*999\$d 11 22 INVALID<