c6116fe30b221e2d0a4de42db029dbb8fb782035
[ust.git] / tests / snprintf / prog.c
1 #include <stdio.h>
2 #include <string.h>
3
4 int main()
5 {
6 char buf[100];
7
8 char *expected;
9
10 expected = "header 9999, hello, 005, ' 9'";
11 ust_safe_snprintf(buf, 99, "header %d, %s, %03d, '%3$*d'", 9999, "hello", 5, 9);
12 if(strcmp(buf, expected) != 0) {
13 printf("Error: expected \"%s\" and got \"%s\"\n", expected, buf);
14 return 1;
15 }
16
17 return 0;
18 }
This page took 0.02899 seconds and 3 git commands to generate.