diff options
Diffstat (limited to 'lib/libncurses/TESTS/scroll3.c')
-rw-r--r-- | lib/libncurses/TESTS/scroll3.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/libncurses/TESTS/scroll3.c b/lib/libncurses/TESTS/scroll3.c new file mode 100644 index 0000000..1d63c46 --- /dev/null +++ b/lib/libncurses/TESTS/scroll3.c @@ -0,0 +1,51 @@ +#include <ncurses.h> + +main(int argc, char **argv) +{ + WINDOW *w, *x; + + initscr(); + w = newwin(0, 0, 0, 0); + if (argc > 2) + x = newwin(0, 0, 0, 0); + scrollok(w, TRUE); + if (argc > 2) + scrollok(x, TRUE); + idlok(w, TRUE); + if (argc > 2) + idlok(x, TRUE); + wmove(w, LINES - 1, 0); + waddstr(w, "test 1 in w"); + wrefresh(w); + sleep(1); + if (argc == 2 || argc == 4) + { + waddch(w, '\n'); + sleep(1); + waddch(w, '\n'); + sleep(1); + waddch(w, '\n'); + sleep(1); + beep(); + wrefresh(w); + } + sleep(1); + if (argc > 2) + { + wmove(x, LINES - 1, 0); + waddstr(x, "test 2 in x"); + sleep(1); + waddch(x, '\n'); + sleep(1); + waddch(x, '\n'); + sleep(1); + waddch(x, '\n'); + sleep(1); + beep(); + wrefresh(w); + sleep(1); + } + endwin(); + return 0; +} + |