shithub: mc

Download patch

ref: 6b081b7a22e36333259e0ed5bd03803b65df9c6d
parent: 9df81ed24b6326058a4038fd4984ff150617a6b2
author: Ori Bernstein <[email protected]>
date: Sat Jun 21 09:29:43 EDT 2014

Add tests for padded format strings.

--- a/test/data/stdfmtpad-expected
+++ b/test/data/stdfmtpad-expected
@@ -1,4 +1,7 @@
       abcd
 00000bdcae
+abcdefghijkl
+a
         10
 0000000010
+100000
--- a/test/stdfmtpad.myr
+++ b/test/stdfmtpad.myr
@@ -3,6 +3,9 @@
 const main = {
 	std.put("%10s\n", "abcd")
 	std.put("%010s\n", "bdcae")
+	std.put("%010s\n", "abcdefghijkl")
+	std.put("%01s\n", "a")
 	std.put("%10i\n", 10)
 	std.put("%010i\n", 10)
+	std.put("%3i\n", 100000)
 }