cvsuser 03/02/10 13:49:10
Modified: t/op string.t
Log:
Test more of the sprintf formats
Revision Changes Path
1.41 +31 -1 parrot/t/op/string.t
Index: string.t
===================================================================
RCS file: /cvs/public/parrot/t/op/string.t,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -w -r1.40 -r1.41
--- string.t 21 Nov 2002 16:41:33 -0000 1.40
+++ string.t 10 Feb 2003 21:49:10 -0000 1.41
@@ -1462,11 +1462,31 @@
bsr NEWARYI
bsr PRINTF
+ set S1, "+123 == %+vd\n"
+ set I0, 123
+ bsr NEWARYI
+ bsr PRINTF
+
set S1, "256 == %vu\n"
set I0, 256
bsr NEWARYI
bsr PRINTF
+ set S1, "+1 == %+vu\n"
+ set I0, 1
+ bsr NEWARYI
+ bsr PRINTF
+
+ set S1, "001 == %0.3u\n"
+ set I0, 1
+ bsr NEWARYI
+ bsr PRINTF
+
+ set S1, "+001 == %+0.3u\n"
+ set I0, 1
+ bsr NEWARYI
+ bsr PRINTF
+
set S1, "0.500000 == %f\n"
set N0, 0.5
bsr NEWARYN
@@ -1492,6 +1512,11 @@
bsr NEWARYN
bsr PRINTF
+ set S1, "%% == %%\n"
+ set I0, 0
+ bsr NEWARYI
+ bsr PRINTF
+
set S1, "That's all, %s\n"
set S0, "folks!"
bsr NEWARYS
@@ -1506,12 +1531,17 @@
Hello, Hello, Pa!
1 == 1
-255 == -255
++123 == +123
256 == 256
++1 == +1
+001 == 001
++001 == +001
0.500000 == 0.500000
0.500 == 0.500
0.001 == 0.001
1e+06 == 1e+06
0.5 == 0.5
+% == %
That's all, folks!
OUTPUT
- cvs commit: parrot/t/op string.t dan
- cvs commit: parrot/t/op string.t jgoff
- cvs commit: parrot/t/op string.t grunblatt
- cvs commit: parrot/t/op string.t dan
- cvs commit: parrot/t/op string.t dan
- cvs commit: parrot/t/op string.t dan
- cvs commit: parrot/t/op string.t sfink
- cvs commit: parrot/t/op string.t sfink
- cvs commit: parrot/t/op string.t nicholas
- cvs commit: parrot/t/op string.t dan
- cvs commit: parrot/t/op string.t Simon Glover
- cvs commit: parrot/t/op string.t Leopold Toetsch
- cvs commit: parrot/t/op string.t Leopold Toetsch
- cvs commit: parrot/t/op string.t Leopold Toetsch
- cvs commit: parrot/t/op string.t Leopold Toetsch
- cvs commit: parrot/t/op string.t Leopold Toetsch
- cvs commit: parrot/t/op string.t Peter Gibbs
- cvs commit: parrot/t/op string.t Leopold Toetsch
- cvs commit: parrot/t/op string.t Leopold Toetsch
- cvs commit: parrot/t/op string.t Simon Glover
- cvs commit: parrot/t/op string.t Gregor N . Purdy
