flockfile list corruption test
[libc-test.git] / src / regression / scanf-match-literal-eof.c
blobbd7c5e73b66e1f8f97c1219abca044866f847504
1 // commit: 5efc6af4ebb9d50eb978d0338835544fdfea0396 2011-04-25
2 // scanf misreports literal match as input failure when reading EOF (null for sscanf)
3 #include <stdio.h>
4 #include "test.h"
6 int main(void)
8 char buf[] = { 0 };
9 int match_count;
11 match_count = sscanf(buf, "a");
12 if(match_count != EOF)
13 t_error("scanf reported match failure instead of input failure on literal EOF match\n");
15 return t_status;