mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
7cd3fcfbaa
commit
e3b9ed7649
3 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Apr 5 13:22:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/curses/curses.c (Init_curses): fix implementation function,
|
||||
crmode should be same as cbreak. [ruby-core:54013] [Bug #8222]
|
||||
|
||||
Fri Apr 5 12:06:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* ext/curses/hello.rb: Typo in Curses example by Drew Blas
|
||||
|
|
|
@ -2715,7 +2715,7 @@ Init_curses(void)
|
|||
rb_define_module_function(mCurses, "noraw", curses_noraw, 0);
|
||||
rb_define_module_function(mCurses, "cbreak", curses_cbreak, 0);
|
||||
rb_define_module_function(mCurses, "nocbreak", curses_nocbreak, 0);
|
||||
rb_define_module_function(mCurses, "crmode", curses_nocbreak, 0);
|
||||
rb_define_module_function(mCurses, "crmode", curses_cbreak, 0);
|
||||
rb_define_module_function(mCurses, "nocrmode", curses_nocbreak, 0);
|
||||
rb_define_module_function(mCurses, "nl", curses_nl, 0);
|
||||
rb_define_module_function(mCurses, "nonl", curses_nonl, 0);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue