From bf4aeed129ba7518be04ab9e53073bdb737a24b8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 18 Jun 2009 22:22:04 +0200 Subject: printf: fix exit code on conversion error Signed-off-by: Colin Watson Signed-off-by: Denys Vlasenko --- testsuite/printf.tests | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'testsuite') 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 %" \ -- cgit v1.1