1 #include <stdio.h>
2 #include <string.h>
3 
4 static char buf[32768];
5 static const char expected[] = "\
6 \n\
7 a\n\
8 abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
9 
10 static int
do_test(void)11 do_test (void)
12 {
13   snprintf (buf, sizeof (buf),
14 	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
15 	    "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
16 	    "a", "b", "c", "d", 5);
17   return strcmp (buf, expected) != 0;
18 }
19 
20 #define TEST_FUNCTION do_test ()
21 #include "../test-skeleton.c"
22