From 33d773ff5a8154bb18c93c48b5a4607f2882bcdf Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 5 Apr 2013 00:51:54 -0500 Subject: handle optional terminal capabilities slightly better --- test/tput.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/tput.rs') 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); } -- cgit v1.2.3-54-g00ecf