diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-18 22:22:04 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-18 22:22:04 +0200 |
commit | bf4aeed129ba7518be04ab9e53073bdb737a24b8 (patch) | |
tree | 3a98fa58c9d7fc378560b9717c44a97d30c3edfd /testsuite/printf.tests | |
parent | c9f280cc469daccfc0eba20bca6a1341070230b6 (diff) | |
download | busybox-w32-bf4aeed129ba7518be04ab9e53073bdb737a24b8.tar.gz busybox-w32-bf4aeed129ba7518be04ab9e53073bdb737a24b8.tar.bz2 busybox-w32-bf4aeed129ba7518be04ab9e53073bdb737a24b8.zip |
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-x | testsuite/printf.tests | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/testsuite/printf.tests b/testsuite/printf.tests index 558ecb194..0a63f0f57 100755 --- a/testsuite/printf.tests +++ b/testsuite/printf.tests | |||
@@ -87,13 +87,12 @@ testing "printf understands %Ld" \ | |||
87 | # "1\n""printf: -2: invalid number\n""0\n""3\n""0\n" \ | 87 | # "1\n""printf: -2: invalid number\n""0\n""3\n""0\n" \ |
88 | # "" "" | 88 | # "" "" |
89 | 89 | ||
90 | # Actually, we are wrong here: exit code should be 1 | ||
91 | testing "printf handles %d bad_input" \ | 90 | testing "printf handles %d bad_input" \ |
92 | "${bb}printf '%d\n' 1 - 2 bad 3 123bad 4 2>&1; echo \$?" \ | 91 | "${bb}printf '%d\n' 1 - 2 bad 3 123bad 4 2>&1; echo \$?" \ |
93 | "1\n""printf: -: invalid number\n""0\n"\ | 92 | "1\n""printf: -: invalid number\n""0\n"\ |
94 | "2\n""printf: bad: invalid number\n""0\n"\ | 93 | "2\n""printf: bad: invalid number\n""0\n"\ |
95 | "3\n""printf: 123bad: invalid number\n""0\n"\ | 94 | "3\n""printf: 123bad: invalid number\n""0\n"\ |
96 | "4\n""0\n" \ | 95 | "4\n""1\n" \ |
97 | "" "" | 96 | "" "" |
98 | 97 | ||
99 | testing "printf aborts on bare %" \ | 98 | testing "printf aborts on bare %" \ |