summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenis Vlasenko2008-07-18 18:41:55 +0000
committerDenis Vlasenko2008-07-18 18:41:55 +0000
commit5f116629d80b66bd09d8dc2b849befb1e27cd21a (patch)
treeedaa027f78c58d62edd1c75967bf86364dc581da /testsuite
parentf19817ddc2f2162803b19448ea2b23b1209911dd (diff)
downloadbusybox-5f116629d80b66bd09d8dc2b849befb1e27cd21a.zip
busybox-5f116629d80b66bd09d8dc2b849befb1e27cd21a.tar.gz
printf: do not print garbage on "%Ld". closes bug 4214.
function old new delta printf_main 633 637 +4 multiconvert 99 79 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-20) Total: -16 bytes
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/printf.tests5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/printf.tests b/testsuite/printf.tests
index a5c71ec..f9d1dec 100755
--- a/testsuite/printf.tests
+++ b/testsuite/printf.tests
@@ -74,6 +74,11 @@ testing "printf understands %ld" \
"-5\n""0\n" \
"" ""
+testing "printf understands %Ld" \
+ "${bb}printf '%Ld\n' -5 2>&1; echo \$?" \
+ "-5\n""0\n" \
+ "" ""
+
# We are "more correct" here than bash/coreutils: they happily print -2
# as if it is a huge unsigned number
testing "printf handles %u -N" \