regex memory corruption regression test
[libc-test] / src / regression / scanf-match-literal-eof.c
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"
5
6 int main(void)
7 {
8         char buf[] = { 0 };
9         int match_count;
10
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");
14
15         return t_status;
16 }