aboutsummaryrefslogtreecommitdiffstats
path: root/test/io/console
Commit message (Collapse)AuthorAgeFilesLines
* io/console: unknown key code for names with nulnobu2016-04-151-0/+15
| | | | | | | | | | * ext/io/console/console.c (console_key_pressed_p): raise the same exception, "unknown virtual key code", for names with nul chars. though console_win32_vk() considers the length and can deal with nul chars, rb_sprintf() raised at PRIsVALUE previously, so quote it if it is unprintable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/console: move conditionsnobu2016-04-151-4/+7
| | | | | | | * test/io/console/test_io_console.rb: move conditions for method definitions before the bodies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* TestIO_Console.rb: disable getpass test by --excludesnobu2015-12-091-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: skipnobu2015-12-091-0/+1
| | | | | | | * test/io/console/test_io_console.rb (test_getpass): skip for the time being. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: waitnobu2015-12-091-1/+2
| | | | | | | | * test/io/console/test_io_console.rb (test_getpass): wait for the child process to read the input, not to read it by the master itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: ignore echo backnobu2015-12-091-1/+1
| | | | | | | | * test/io/console/test_io_console.rb (test_getpass): ignore echo back of input from the master side. some systems seem echo back but other may not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (run_pty): Avoid waiting twicengoto2015-12-081-1/+0
| | | | | | | | for a process. Fix Errno::ECHILD in TestIO_Console#test_close and TestIO_Console#test_sync. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* retry IO#getpassnobu2015-12-081-4/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r52902,r52903,r52910,r52911,r52937,r52939naruse2015-12-081-27/+4
| | | | | | Reject IO::Console#getpass because it can't test portablly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: separate master and slavenobu2015-12-081-8/+16
| | | | | | | | * test/io/console/test_io_console.rb (test_getpass): separate master side and slave side in each threads. r52937 deadlocked on OS X. [Bug #11780] [ruby-dev:49412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (test_getpass): s.getpassngoto2015-12-081-10/+10
| | | | | | | | should be tested. Narrow ensure block. This reverts r52911. [Bug #11780] [ruby-dev:49412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* temporally remove prompt to pass the testnaruse2015-12-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: waitnobu2015-12-061-1/+2
| | | | | | | * test/io/console/test_io_console.rb (test_getpass): wait slave thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* console.c: console_getpassnobu2015-12-061-0/+14
| | | | | | | * ext/io/console/console.c (console_getpass): add IO#getpass method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC]akr2015-01-111-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: different namesnobu2014-12-281-2/+2
| | | | | | | * test/io/console/test_io_console.rb (test_noctty): use different names for each tempfiles. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* console.c: IO.console arguments passingnobu2014-12-251-0/+8
| | | | | | | | | | * ext/io/console/console.c (console_dev): send the given arguments to the opened console. as a special case, do nothing if :close is given. * test/lib/leakchecker.rb (LeakChecker#check_fd_leak): close if console. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: use getsnobu2014-12-251-2/+3
| | | | | | | * test/io/console/test_io_console.rb (run_pty): pty cannot read all, should use gets only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: chomp resultsnobu2014-12-251-1/+1
| | | | | | | * test/io/console/test_io_console.rb (run_pty): IO#readlines ignores the given block. need map to chomp the results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (TestIO_Console#run_pty): no block given.usa2014-12-251-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* console.c: get rid of NameErrornobu2014-12-251-10/+24
| | | | | | | * ext/io/console/console.c (console_dev): id_console is not a constant name, use rb_const_remove() to get rid of NameError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Join threads, not kill.akr2014-05-301-13/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/io/console/test_io_console.rb: Close FDs.akr2014-05-301-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: show failure detailsnobu2014-05-101-3/+2
| | | | | | | * test/io/console/test_io_console.rb (test_noctty): use `assert_ruby_status` to show failure details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fiddle/test_function.rb: remove unused variables.hsbt2014-02-241-1/+1
| | | | | | | * test/fileutils/test_fileutils.rb: ditto. * test/io/console/test_io_console.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: investigate hang-upnobu2013-04-281-5/+13
| | | | | | | * test/io/console/test_io_console.rb (TestIO_Console#test_noctty): grab error outputs and stop the loop upto 3 seconds. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* console.c: default by stty rawnobu2013-02-051-7/+17
| | | | | | | * ext/io/console/console.c (rawmode_opt): use default values by `stty raw`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_console.rb: descriptive assertionsnobu2013-02-031-3/+9
| | | | | | | | * test/io/console/test_io_console.rb (test_stringio_getch): use more descriptive assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* console.c: fix unit of minnobu2013-02-031-0/+32
| | | | | | | | * ext/io/console/console.c (rawmode_opt): min is minimum characters, not tenths. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/io/console/console.c (set_rawmode): clear ECHOE and ECHOKnobu2012-03-061-9/+19
| | | | | | | | | | | bits too. * ext/io/console/console.c (echo_p): ignore ECHOE and ECHOK bits. [ruby-dev:45309] [Bug #6116] * ext/io/console/console.c (console_raw): fix rdoc. * ext/io/console/console.c (console_set_echo): mentioned about platform dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/io/console/console.c (io_getch): default delegating methodnobu2012-01-251-2/+10
| | | | | | | | for StringIO. https://github.com/nobu/io-console/issues/4 * ext/stringio/stringio.c: moved some methods to hidden modules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/io/console/console.c (console_cooked, console_set_cooked):nobu2011-11-181-0/+15
| | | | | | new methods to reset cooked mode. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (test_noctty): daemon() onnobu2011-08-041-8/+15
| | | | | | | | OpenBSD seems not to detach the controlling terminal, when the argument noclose is non-zero. ref: [Bug #5135] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (TestIO_Console#test_sync):shyouhei2011-08-011-0/+3
| | | | | | | Skip when PTY allocation failed (that's not our failt). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (TestIO_Console#test_noctty):nobu2011-06-171-0/+2
| | | | | | dispose temporary file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (TestIO_Console#test_sync):nobu2011-06-161-3/+11
| | | | | | fix for daemon process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Skip test_sync when there is no tty or something.naruse2011-06-141-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (TestIO_Console#test_noctty):nobu2011-06-141-7/+11
| | | | | | split for each platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (TestIO_Console#test_noctty):nobu2011-06-131-5/+17
| | | | | | fix for Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/io/console/console.c (console_dev): console should benobu2011-06-131-0/+4
| | | | | | unbuffered. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/io/console/console.c (console_dev): take care of no-cttynobu2011-06-131-0/+10
| | | | | | case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb (assert_include): add alias.nobu2011-02-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb: Don't run test if the systemkosaki2011-01-231-4/+7
| | | | | | | | don't support io/console. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/console/test_io_console.rb (TestIO_Console::helper):shyouhei2010-09-171-11/+23
| | | | | | | | | | PTY.open is not guaranteed to work. On my machine opening a pty is prohibited via process control group. On those cases exceptions shall occur, and that doesn't mean our fault. Skip those tests on such situations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* portability fix.akr2010-07-031-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refine tests.akr2010-07-031-9/+60
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add sleep.akr2010-06-111-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/io/console/console.c (get_write_fd): return primary fd if nonobu2010-05-131-0/+9
| | | | | | io is tied for writing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e