summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libcurses/tests/cbreak
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/netbsd-tests/lib/libcurses/tests/cbreak')
-rw-r--r--contrib/netbsd-tests/lib/libcurses/tests/cbreak18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libcurses/tests/cbreak b/contrib/netbsd-tests/lib/libcurses/tests/cbreak
new file mode 100644
index 0000000..b8bf60e
--- /dev/null
+++ b/contrib/netbsd-tests/lib/libcurses/tests/cbreak
@@ -0,0 +1,18 @@
+include start
+# setting noecho stops getch setting cbreak itself so we should need
+# a newline before getch returns, check this works first.
+call OK noecho
+input "abcd\n"
+call 0x61 getch
+noinput
+call 0x62 getch
+noinput
+call 0x63 getch
+noinput
+call 0x64 getch
+noinput
+call 0x0a getch
+# set cbreak, getch should return without needing a newline
+input "ef"
+call OK cbreak
+call 0x65 getch
OpenPOWER on IntegriCloud