aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-01-11 10:16:38 -0600
committerRob Landley <rob@landley.net>2015-01-11 10:16:38 -0600
commitd0dead30a53c0353fd1c31aa5183fdcc2b30491b (patch)
treebf13cf40aa3215ce864e51d3368af3744eddde0c /tests
parentcaa6b014ba15dea377e5f65fcac57afaa932fa64 (diff)
downloadtoybox-d0dead30a53c0353fd1c31aa5183fdcc2b30491b.tar.gz
One more bugfix for printf.c, with test suite entry. (Make %-3d etc work.)
Diffstat (limited to 'tests')
-rw-r--r--tests/printf.test5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/printf.test b/tests/printf.test
index 7b4b821d..5cbefb59 100644
--- a/tests/printf.test
+++ b/tests/printf.test
@@ -37,7 +37,10 @@ testing "printf %s width precision" \
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 '%3c'" "$PRINTF '%3c' x" " x" "" ""
+testing "printf '%-3c'" "$PRINTF '%-3c' x" "x " "" ""
+testing "printf '%+d'" "$PRINTF '%+d' 5" "+5" "" ""
+
testing "printf '%5d%4d' 1 21 321 4321 54321" \
"$PRINTF '%5d%4d' 1 21 321 4321 54321" " 1 21 321432154321 0" "" ""