Skip to content
Snippets Groups Projects
Commit 49dec86a authored by Ahmed Abd El Mawgood's avatar Ahmed Abd El Mawgood
Browse files

Unit test arbitrarily long ungetc()

parent 7a6f9637
Branches
Tags
No related merge requests found
...@@ -42,6 +42,7 @@ EXPECT_NAMES=\ ...@@ -42,6 +42,7 @@ EXPECT_NAMES=\
stdio/setvbuf \ stdio/setvbuf \
stdio/sprintf \ stdio/sprintf \
stdio/printf_space_pad \ stdio/printf_space_pad \
stdio/ungetc_multiple \
stdlib/a64l \ stdlib/a64l \
stdlib/alloc \ stdlib/alloc \
stdlib/atof \ stdlib/atof \
......
hello world
#include <stdio.h>
int main() {
ungetc('\n', stdin);
ungetc('d', stdin);
ungetc('l', stdin);
ungetc('r', stdin);
ungetc('o', stdin);
ungetc('w', stdin);
ungetc(' ', stdin);
ungetc('o', stdin);
ungetc('l', stdin);
ungetc('l', stdin);
ungetc('e', stdin);
ungetc('h', stdin);
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
putchar(getchar());
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment