diff options
author | James Edward Gray II <james@graysoftinc.com> | 2012-01-08 20:11:32 -0600 |
---|---|---|
committer | James Edward Gray II <james@graysoftinc.com> | 2012-01-08 20:11:32 -0600 |
commit | 5ce8a1a565b8f03fc277225fc8485f20408f4395 (patch) | |
tree | c9c94cf5088f43b6c169c0c48b6d31657ff8efd2 /test/tc_highline.rb | |
parent | 638bc6311e5a13605b3e8de367bdf4537589fb5c (diff) | |
download | highline-5ce8a1a565b8f03fc277225fc8485f20408f4395.tar.gz |
Fixing a regression.
Diffstat (limited to 'test/tc_highline.rb')
-rwxr-xr-x | test/tc_highline.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/tc_highline.rb b/test/tc_highline.rb index bd025b6..5cb43a7 100755 --- a/test/tc_highline.rb +++ b/test/tc_highline.rb @@ -62,6 +62,16 @@ class TestHighLine < Test::Unit::TestCase assert_raise(EOFError) { @terminal.ask("Any input left? ") } end + def test_ask_string + name = "James Edward Gray II" + @input << name << "\n" + @input.rewind + + assert_equal(name, @terminal.ask("What is your name? ", String)) + + assert_raise(EOFError) { @terminal.ask("Any input left? ", String) } + end + def test_bug_fixes # auto-complete bug @input << "ruby\nRuby\n" |