aboutsummaryrefslogtreecommitdiffstats
path: root/test/rl.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-03-20 21:33:19 -0500
committerJesse Luehrs <doy@tozt.net>2013-03-20 21:33:19 -0500
commitd00c8ec76c498196be8bfe2d58f27697bda9de69 (patch)
treec3126e111332355683d533d7741afbaca7f36cd4 /test/rl.rs
parent8fc473d033a4c38f7c0024bd259ff54b9867d50d (diff)
downloadrust-term-d00c8ec76c498196be8bfe2d58f27697bda9de69.tar.gz
rust-term-d00c8ec76c498196be8bfe2d58f27697bda9de69.zip
start working on a terminfo wrapper
Diffstat (limited to 'test/rl.rs')
-rw-r--r--test/rl.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rl.rs b/test/rl.rs
new file mode 100644
index 0000000..2ea664f
--- /dev/null
+++ b/test/rl.rs
@@ -0,0 +1,18 @@
+extern mod term;
+use core::io::ReaderUtil;
+
+fn main () {
+ term::info::init();
+ let (rows, cols) = term::ios::size();
+ do term::ios::preserve {
+ term::ios::cbreak();
+ do term::info::with_alternate_screen {
+ term::info::clear();
+ for uint::range(0, rows) |i| {
+ term::info::move(0, i);
+ io::print(str::repeat(".", cols));
+ }
+ io::stdin().read_char();
+ }
+ }
+}