summaryrefslogtreecommitdiff
path: root/testsuite/printf.tests
diff options
context:
space:
mode:
authorDenys Vlasenko2009-06-18 22:22:04 +0200
committerDenys Vlasenko2009-06-18 22:22:04 +0200
commitbf4aeed129ba7518be04ab9e53073bdb737a24b8 (patch)
tree3a98fa58c9d7fc378560b9717c44a97d30c3edfd /testsuite/printf.tests
parentc9f280cc469daccfc0eba20bca6a1341070230b6 (diff)
downloadbusybox-bf4aeed129ba7518be04ab9e53073bdb737a24b8.zip
busybox-bf4aeed129ba7518be04ab9e53073bdb737a24b8.tar.gz
printf: fix exit code on conversion error
Signed-off-by: Colin Watson <cjwatson@ubuntu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/printf.tests')
-rwxr-xr-xtestsuite/printf.tests3
1 files changed, 1 insertions, 2 deletions
diff --git a/testsuite/printf.tests b/testsuite/printf.tests
index 558ecb1..0a63f0f 100755
--- a/testsuite/printf.tests
+++ b/testsuite/printf.tests
@@ -87,13 +87,12 @@ testing "printf understands %Ld" \
# "1\n""printf: -2: invalid number\n""0\n""3\n""0\n" \
# "" ""
-# Actually, we are wrong here: exit code should be 1
testing "printf handles %d bad_input" \
"${bb}printf '%d\n' 1 - 2 bad 3 123bad 4 2>&1; echo \$?" \
"1\n""printf: -: invalid number\n""0\n"\
"2\n""printf: bad: invalid number\n""0\n"\
"3\n""printf: 123bad: invalid number\n""0\n"\
-"4\n""0\n" \
+"4\n""1\n" \
"" ""
testing "printf aborts on bare %" \