about summary refs log tree commit diff
path: root/stdio-common/scanf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/scanf8.c')
-rw-r--r--stdio-common/scanf8.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/stdio-common/scanf8.c b/stdio-common/scanf8.c
new file mode 100644
index 0000000000..316f45df01
--- /dev/null
+++ b/stdio-common/scanf8.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+main ()
+{
+  int ret;
+  char buf [1024] = "Ooops";
+
+  ret = sscanf ("static char Term_bits[] = {", "static char %s = {", buf);
+  printf ("ret: %d, name: %s\n", ret, buf);
+  if (ret != 1 || strcmp (buf, "Term_bits[]") != 0)
+    abort ();
+  return 0;
+}