diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-04-05 00:51:54 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-04-05 00:51:54 -0500 |
commit | 33d773ff5a8154bb18c93c48b5a4607f2882bcdf (patch) | |
tree | 149f0774ba7aab6c9c2e4199bd4cb509cbba3bc1 /test/tput.rs | |
parent | fe705e95db0fda3dc5b753cac8bda94b21f2a5e0 (diff) | |
download | rust-term-33d773ff5a8154bb18c93c48b5a4607f2882bcdf.tar.gz rust-term-33d773ff5a8154bb18c93c48b5a4607f2882bcdf.zip |
handle optional terminal capabilities slightly better
Diffstat (limited to 'test/tput.rs')
-rw-r--r-- | test/tput.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/tput.rs b/test/tput.rs index b2cfc59..3fe9ea1 100644 --- a/test/tput.rs +++ b/test/tput.rs @@ -6,5 +6,9 @@ fn main () { } term::info::init(); - print(term::info::escape(os::args()[1])); + let attr: &str = os::args()[1]; + let escape = term::info::escape(attr).expect( + fmt!("%s is not supported on this terminal", attr) + ); + print(escape); } |