1570af302Sopenharmony_ci// commit: 5efc6af4ebb9d50eb978d0338835544fdfea0396 2011-04-25
2570af302Sopenharmony_ci// scanf misreports literal match as input failure when reading EOF (null for sscanf)
3570af302Sopenharmony_ci#include <stdio.h>
4570af302Sopenharmony_ci#include "test.h"
5570af302Sopenharmony_ci
6570af302Sopenharmony_ciint main(void)
7570af302Sopenharmony_ci{
8570af302Sopenharmony_ci	char buf[] = { 0 };
9570af302Sopenharmony_ci	int match_count;
10570af302Sopenharmony_ci
11570af302Sopenharmony_ci	match_count = sscanf(buf, "a");
12570af302Sopenharmony_ci	if(match_count != EOF)
13570af302Sopenharmony_ci		t_error("scanf reported match failure instead of input failure on literal EOF match\n");
14570af302Sopenharmony_ci
15570af302Sopenharmony_ci	return t_status;
16570af302Sopenharmony_ci}
17