More half-finished cleanup of printf.c, and more test suite entries.
diff --git a/tests/printf.test b/tests/printf.test
index ded169e..7b4b821 100644
--- a/tests/printf.test
+++ b/tests/printf.test
@@ -21,7 +21,7 @@
 testing "printf not octal" "$PRINTF '\9'" '\9' "" ""
 testing "printf hex" "$PRINTF 'A\x1b\x2B\x3Q\xa' | od -An -tx1" \
   ' 41 1b 2b 03 51 0a\n' "" ""
-testing "printf " "$PRINTF '%x\n' 0x2a" "2a\n" "" ""
+testing "printf %x" "$PRINTF '%x\n' 0x2a" "2a\n" "" ""
 
 testing "printf %d 42" "$PRINTF %d 42" "42" "" ""
 testing "printf %d 0x2a" "$PRINTF %d 0x2a" "42" "" ""
@@ -31,6 +31,14 @@
   "$PRINTF '%3s,%.3s,%10s,%10.3s' abcde fghij klmno pqrst" \
   "abcde,fgh,     klmno,       pqr" "" ""
 
+# posix: "The format operand shall be reused as often as necessary to satisfy
+# the argument operands."
+
+testing "printf extra args" "$PRINTF 'abc%s!%ddef\n' X 42 ARG 36" \
+	"abcX!42def\nabcARG!36def\n" "" ""
+
+testing "printf '%3c'" "printf '%3c' x" "  x" "" ""
+
 testing "printf '%5d%4d' 1 21 321 4321 54321" \
   "$PRINTF '%5d%4d' 1 21 321 4321 54321" "    1  21  321432154321   0" "" ""
 testing "printf '%c %c' 78 79" "$PRINTF '%c %c' 78 79" "7 7" "" ""