diff options
author | Abinoam Praxedes Marques Jr <abinoam@gmail.com> | 2015-10-09 13:41:19 -0300 |
---|---|---|
committer | Abinoam Praxedes Marques Jr <abinoam@gmail.com> | 2015-10-09 15:05:19 -0300 |
commit | 8e6cef58caf8d56da1cbda04c83c3882d1496468 (patch) | |
tree | 5efb833f2a0e28990c8e156f6def53b6b6af294f | |
parent | 482d641922d1213c0884ee286689611ca76751ec (diff) | |
download | highline-8e6cef58caf8d56da1cbda04c83c3882d1496468.tar.gz |
Add test for #168 - raising when quiting paging
-rwxr-xr-x | test/tc_highline.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/tc_highline.rb b/test/tc_highline.rb index cdda30a..2b4e1a8 100755 --- a/test/tc_highline.rb +++ b/test/tc_highline.rb @@ -977,6 +977,19 @@ class TestHighLine < Test::Unit::TestCase (45..50).map { |n| "This is line #{n}.\n"}.join, @output.string ) end + + def test_quiting_paging_shouldnt_raise + # See https://github.com/JEG2/highline/issues/168 + + @terminal.page_at = 6 + + @input << "q" + @input.rewind + + list = "a\nb\nc\nd\ne\nf\n" + + assert_nothing_raised { @terminal.say(list) } + end def test_range_requirements @input << "112\n-541\n28\n" |