aboutsummaryrefslogtreecommitdiff
path: root/tests/printf/test.c
diff options
context:
space:
mode:
authorRanger Harke <ranger.harke@autodesk.com>2013-09-19 17:09:10 -0400
committerRanger Harke <ranger.harke@autodesk.com>2013-09-19 17:09:10 -0400
commitb72b6d897250cc7624b66832f720ff3bed6823a6 (patch)
treeb5ee896cb45e24bab3114e018744a574e4577912 /tests/printf/test.c
parente4678bed92f20ea0b5cd6fa2467cc2b0444511e0 (diff)
Fix bug with forced display of sign on negative integers
The negative sign was displayed twice.
Diffstat (limited to 'tests/printf/test.c')
-rw-r--r--tests/printf/test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/printf/test.c b/tests/printf/test.c
index c5f159f1..b01a99db 100644
--- a/tests/printf/test.c
+++ b/tests/printf/test.c
@@ -10,6 +10,7 @@ int main() {
printf("Decimals: %d %ld %lld %d\n", 1977, 650000L, 12LL, 4);
printf("Preceding with blanks: %10d %10d\n", 1977, -1977);
printf("Preceding with zeros: %010d %010d\n", 1977, -1977);
+ printf("Force sign: %+d %+d %+6d %+6d\n", 1977, -1977, 1977, -1977);
printf("Some different radixes: %d %x %o %#x %#o\n", 100, 100, 100, 100, 100);
printf("floats: %4.2f %+.0e %E %08.2f\n", 3.1416, 3.1416, 3.1416, 3.1416);
printf("negative floats: %4.2f %+.0e %E %08.2f\n", -3.1416, -3.1416, -3.1416, -3.1416);