Sync usage with man page.
[netbsd-mini2440.git] / regress / lib / libc / stdio / printf / printf.c
blob94ef0bf83d4f93b892e23610419e56f7fa03a12b
1 /* $NetBSD$ */
3 /*
4 * Written by Klaus Klein <kleink@NetBSD.org>, February 28, 2006.
5 * Public domain.
6 */
8 #include <assert.h>
9 #include <stdio.h>
11 int
12 main(int argc, char *argv[])
14 char s[2];
16 /* PR lib/32951: %.0f formats (0.0,0.5] to "0." */
17 assert(snprintf(s, sizeof(s), "%.0f", 0.1) == 1);
18 assert(s[0] == '0');
19 /* assert(s[1] == '\0'); */
21 return 0;