5 int main(int argc, char *argv[]) {
11 matches = sscanf("x ]", "%[^] ]", str);
12 printf("Matches = %d, string str = \"%s\".\n", matches, str);
13 printf("str should be \"x\".\n");
14 if (strcmp (str, "x")) abort ();
17 matches = sscanf(" ] x", "%[] ]", str);
18 printf("Matches = %d, string str = \"%s\".\n", matches, str);
19 printf("str should be \" ] \".\n");
20 if (strcmp (str, " ] ")) abort ();