From 81a48cc08033a453bcb884ec0838a8f064a6611e Mon Sep 17 00:00:00 2001 From: Charles Bailey Date: Sun, 21 Jun 2015 19:25:43 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- test-parse-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test-parse-options.c') diff --git a/test-parse-options.c b/test-parse-options.c index 5dabce60f3..7c492cf724 100644 --- a/test-parse-options.c +++ b/test-parse-options.c @@ -82,7 +82,7 @@ int main(int argc, char **argv) argc = parse_options(argc, (const char **)argv, prefix, options, usage, 0); printf("boolean: %d\n", boolean); - printf("integer: %u\n", integer); + printf("integer: %d\n", integer); printf("timestamp: %lu\n", timestamp); printf("string: %s\n", string ? string : "(not set)"); printf("abbrev: %d\n", abbrev); -- cgit v1.2.1