test-parse-options: update to handle negative ints
Fix the printf specification to treat 'integer' as the signed type that it is and add a test that checks that we parse negative option arguments. Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5c040f5af5
commit
81a48cc080
@ -132,6 +132,8 @@ test_expect_success 'OPT_BOOL() no negation #2' 'check_unknown_i18n --no-no-fear
|
||||
|
||||
test_expect_success 'OPT_BOOL() positivation' 'check boolean: 0 -D --doubt'
|
||||
|
||||
test_expect_success 'OPT_INT() negative' 'check integer: -2345 -i -2345'
|
||||
|
||||
cat > expect << EOF
|
||||
boolean: 2
|
||||
integer: 1729
|
||||
|
Reference in New Issue
Block a user