summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-05 04:23:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-05 04:23:05 +0000
commite3b9ed7649a62d37fce1f588cd84802c93331520 (patch)
tree5e25c4e1ed9313356d5dda1c002106887be1d108 /test
parent7cd3fcfbaa8efabe756f52ef36c91469be525d5d (diff)
curses.c: fix function
* ext/curses/curses.c (Init_curses): fix implementation function, crmode should be same as cbreak. [ruby-core:54013] [Bug #8222] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/test_curses.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_curses.rb b/test/test_curses.rb
index d59f7dd354..9432c024bb 100644
--- a/test/test_curses.rb
+++ b/test/test_curses.rb
@@ -51,4 +51,10 @@ src
def test_getch_nocbreak
assert_raise(Timeout::Error) {run_curses("nocbreak; getch", "a")}
end
+ def test_getch_crmode
+ assert_equal("a", run_curses("crmode; getch", "a"))
+ end
+ def test_getch_nocrmode
+ assert_raise(Timeout::Error) {run_curses("nocrmode; getch", "a")}
+ end
end if defined? TestCurses and defined? PTY