summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohn Peacock <jpeacock@rowman.com>2005-12-14 05:12:56 -0500
committerGisle Aas <gisle@activestate.com>2005-12-15 10:42:03 +0000
commit96b8f7ce6100a86cc5ebd0a9974640b15b9529a1 (patch)
treea0172045fce19ab9a6a6c208d9a36b5f5c72caec /t
parent81d555a2137e07e2adf29b74cd4e1878d01e07af (diff)
downloadperl-96b8f7ce6100a86cc5ebd0a9974640b15b9529a1.tar.gz
Re: [perl #37897] sprintf of version objects
Message-ID: <43A03678.2060700@rowman.com> (with some formatting tweaks and extra test cases) p4raw-id: //depot/perl@26365
Diffstat (limited to 't')
-rwxr-xr-xt/op/sprintf.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/op/sprintf.t b/t/op/sprintf.t
index fcc2d304bc..79953ef6c5 100755
--- a/t/op/sprintf.t
+++ b/t/op/sprintf.t
@@ -243,10 +243,20 @@ __END__
>%vd< >"\01\02\03"< >1.2.3<
>%vd< >v1.2.3< >1.2.3<
>%vd< >[version::qv("1.2.3")]< >1.2.3<
+>%vd< >[version::qv("1.2")]< >1.2.0<
+>%vd< >[version::qv("1.02")]< >1.2.0<
+>%vd< >[version::qv("1.002")]< >1.2.0<
+>%vd< >[version::qv("1.02_03")]< >1.23<
+>%vd< >[version::qv("1048576.5")]< >1048576.5.0<
+>%vd< >[version::qv("50")]< >50.0.0<
+>%vd< >[version::qv("50_20")]< >50.200<
+>%vd< >[version::qv("5.005_03")]< >5.53<
>%v.3d< >"\01\02\03"< >001.002.003<
>%0v3d< >"\01\02\03"< >001.002.003<
+>%v.3d< >[version::qv("1.2.3")]< >001.002.003<
>%-v3d< >"\01\02\03"< >1 .2 .3 <
>%+-v3d< >"\01\02\03"< >+1 .2 .3 <
+>%+-v3d< >[version::qv("1.2.3")]< >+1 .2 .3 <
>%v4.3d< >"\01\02\03"< > 001. 002. 003<
>%0v4.3d< >"\01\02\03"< >0001.0002.0003<
>%0*v2d< >['-', "\0\7\14"]< >00-07-12<
@@ -257,6 +267,7 @@ __END__
>%v*.*d< >["\01\02\03", 4, 3]< > 001. 002. 003<
>%0v*.*d< >["\01\02\03", 4, 3]< >0001.0002.0003<
>%0*v*d< >['-', "\0\7\13", 2]< >00-07-11<
+>%0*v*d< >['-', version::qv("0.7.11"), 2]< >00-07-11<
>%e< >1234.875< >1.234875e+03<
>%e< >0.000012345< >1.234500e-05<
>%e< >1234567E96< >1.234567e+102<
@@ -391,6 +402,8 @@ __END__
>%-010x< >2**32-1< >ffffffff <
>%0-10x< >2**32-1< >ffffffff <
>%0*x< >[-10, ,2**32-1]< >ffffffff <
+>%vx< >[version::qv("1.2.3")]< >1.2.3<
+>%vx< >[version::qv("1.20.300")]< >1.14.12c<
>%y< >''< >%y INVALID<
>%z< >''< >%z INVALID<
>%2$d %1$d< >[12, 34]< >34 12<