summaryrefslogtreecommitdiff
path: root/tests/ungets.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ungets.c')
-rw-r--r--tests/ungets.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ungets.c b/tests/ungets.c
new file mode 100644
index 0000000..7374100
--- /dev/null
+++ b/tests/ungets.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+int main() {
+ ungetc('a',stdin);
+ ungetc('b',stdin);
+ printf("%c",fgetc(stdin));
+ printf("%c",fgetc(stdin));
+ printf("\n");
+}