aboutsummaryrefslogtreecommitdiffstats
path: root/test/io/console
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/io-console] Avoid the influence of special variable `$/`Nobuyoshi Nakada2023-08-181-0/+9
| | | | https://github.com/ruby/io-console/commit/5f71354332
* [ruby/io-console] Enable `getpass` methods alwaysNobuyoshi Nakada2023-08-181-1/+0
| | | | https://github.com/ruby/io-console/commit/57f9649df4
* [ruby/io-console] Omit on JRubyNobuyoshi Nakada2022-12-021-0/+1
| | | | https://github.com/ruby/io-console/commit/9122c181eb
* [ruby/io-console] Check rawmode option names strictlyNobuyoshi Nakada2022-12-021-0/+8
| | | | https://github.com/ruby/io-console/commit/aa8fc7e947
* Fix io/console test for --with-static-linked-extAlan Wu2022-11-181-1/+3
| | | | | | The tests looks for the .so file, which doesn't exist when the extension is statically linked. In that situation it passes -I to ruby with nothing after it which ate the -rio/console argument.
* omit all assertions at TestIO_Console#test_intr when running with FreeBSDHiroshi SHIBATA2022-08-231-9/+11
|
* Fix the missing bracketsHiroshi SHIBATA2022-07-281-1/+1
|
* test_io_console.rbL399 is also randomly failing same as ↵Hiroshi SHIBATA2022-07-281-1/+1
| | | | bfc697f1e26f1406c45ec7309ca0d4c0b5ecedd6
* test/io/console/test_io_console.rb: parens neededYusuke Endoh2022-03-081-1/+1
|
* Skip three tests on FreeBSD 13Yusuke Endoh2022-03-081-1/+8
| | | | | | Some tests that use signals frequently fail randomly on FreeBSD 13. Maybe something around signals has changed in FreeBSD 13. This change skips them tentatively.
* Fix `Leaked file descriptor: TestIO_Console#test_console_kw`Kazuhiro NISHIYAMA2022-01-051-1/+3
| | | | | | ``` Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty> ```
* Sync io-console gem.Samuel Williams2021-12-291-0/+8
|
* show encoding for each pathKoichi Sasada2021-11-141-1/+1
|
* test/io/console/test_io_console.rb: dump debug output to stderrYusuke Endoh2021-11-141-1/+2
| | | | make test-all in parallel mode seems to hide stdout
* test/io/console/test_io_console.rb: add debug codeYusuke Endoh2021-11-121-1/+6
| | | | | | | | | | | | | | | | | | to debug the following failure http://ci.rvm.jp/results/trunk-test@ruby-sky1/3708240 ``` /tmp/ruby/v3/src/trunk-test/test/io/console/test_io_console.rb:10:in `===': incompatible encoding regexp match (US-ASCII regexp with UTF-16BE string) (Encoding::CompatibilityError) /tmp/ruby/v3/src/trunk-test/test/io/console/test_io_console.rb:10:in `each' /tmp/ruby/v3/src/trunk-test/test/io/console/test_io_console.rb:10:in `grep' /tmp/ruby/v3/src/trunk-test/test/io/console/test_io_console.rb:10:in `<class:TestIO_Console>' /tmp/ruby/v3/src/trunk-test/test/io/console/test_io_console.rb:9:in `<top (required)>' <internal:/tmp/ruby/v3/src/trunk-test/lib/rubygems/core_ext/kernel_require.rb>:85:in `require' <internal:/tmp/ruby/v3/src/trunk-test/lib/rubygems/core_ext/kernel_require.rb>:85:in `require' /tmp/ruby/v3/src/trunk-test/tool/lib/test/unit/parallel.rb:122:in `run' /tmp/ruby/v3/src/trunk-test/tool/lib/test/unit/parallel.rb:211:in `<main>' running file: /tmp/ruby/v3/src/trunk-test/test/io/console/test_io_console.rb ```
* [ruby/io-console] Skip Interrupt test on Solaris tooNobuyoshi Nakada2021-10-111-1/+1
| | | | https://github.com/ruby/io-console/commit/48db3616da
* [ruby/io-console] Mark all tests that use run_pty as pend on JRubyCharles Oliver Nutter2021-02-051-2/+2
| | | | | | | | | | | | | | JRuby's PTY.spawn does not produce a process with its own controlling terminal, which is necessary for testing these raw escape sequences. This commit marks those tests as pending. The functionality tested appears to work at a command line, but due to this PTY bug in JRuby we cannot test it this way. See https://github.com/jruby/jruby/issues/6552 https://github.com/ruby/io-console/commit/a486b72e5e https://github.com/ruby/io-console/commit/b5c8e7bfd8
* [ruby/io-console] Use omit instead of skipCharles Oliver Nutter2021-02-051-4/+4
| | | | | | | This test runs with test/unit now, which defines omit instead of skip. https://github.com/ruby/io-console/commit/bd731d0b8d
* [ruby/io-console] Skip test on JRubyCharles Oliver Nutter2021-02-051-0/+2
| | | | | | | | The subprocess script here works fine at a command line, but when run as a pty subprocess during the tests the master side hangs waiting for output. https://github.com/ruby/io-console/commit/4a21610ece
* [ruby/io-console] Add console.rb to search for pathsCharles Oliver Nutter2021-02-051-1/+1
| | | | https://github.com/ruby/io-console/commit/74567376c4
* [ruby/io-console] Run subprocesses without test librariesNobuyoshi Nakada2021-02-051-6/+6
| | | | | | | | Now io/console is loaded from test-unit indirectly, test-unit requires power_assert which requires io/console. https://github.com/ruby/io-console/commit/8817d07951 https://github.com/ruby/io-console/commit/639cce89de
* [ruby/io-console] Ignore chomp! result and return the modified stringNobuyoshi Nakada2021-01-051-0/+9
| | | | https://github.com/ruby/io-console/commit/09e5ccc729
* [ruby/io-console] Fix timeout type error (#18)Nobuyoshi Nakada2020-10-111-0/+4
| | | | | | | | | | | | | | | | | Fixed TypeError when IO#getch timed out `rb_io_wait` returns a bit-flags Integer representing available events, or Qfalse if timed out. Also the result of `NUM2INT` is not a `VALUE`. ``` $ ./bin/ruby -v -rio/console -e "p IO.console.getch(intr: true, time: 0.1)" ruby 3.0.0dev (2020-10-09T20:27:30Z master 5ea2ea74cc) [x64-mingw32] -e:1:in `getch': no implicit conversion of false into Integer (TypeError) from -e:1:in `<main>' ``` https://github.com/ruby/io-console/commit/3bdfaf62df
* [ruby/io-console] Bug 17128: In test_set_winsize_console, wrapped re-size in ↵Leam Hall2020-08-271-4/+8
| | | | | | a begin-rescue-else. https://github.com/ruby/io-console/commit/a22333c33a
* Use %w instead of %i not to create unused IDsNobuyoshi Nakada2020-05-091-1/+1
|
* test/io/console/test_io_console.rb: Rescue Errno::ENXIO for SolarisYusuke Endoh2020-05-091-1/+1
| | | | | | | | | https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20200509T100003Z.fail.html.gz ``` 1) Failure: TestIO_Console#test_failed_path [/export/home/users/chkbuild/cb-gcc/tmp/build/20200509T100003Z/ruby/test/io/console/test_io_console.rb:40]: [Errno::ENODEV, Errno::ENOTTY, Errno::EBADF] exception expected, not #<Errno::ENXIO: No such device or address - /dev/null>. ```
* [ruby/io-console] Fails with EBADF on mingwNobuyoshi Nakada2020-05-091-1/+1
| | | | https://github.com/ruby/io-console/commit/530cec574c
* [ruby/io-console] Expanded expected errorsNobuyoshi Nakada2020-05-091-2/+6
| | | | | | May fail with ENOTTY instead of ENODEV. https://github.com/ruby/io-console/commit/fe117b89e0
* [ruby/io-console] Added test for failed pathNobuyoshi Nakada2020-05-091-0/+10
| | | | https://github.com/ruby/io-console/commit/06a540f9b4
* [ruby/io-console] Filter Ruby engine name rather than just /ruby/Charles Oliver Nutter2020-01-181-1/+1
| | | | | | | This breaks tests using this path on JRuby because the `jruby` executable turns into `jjruby` after the sub. https://github.com/ruby/io-console/commit/e5951aa34c
* [ruby/io-console] Enable only interrupt bits on `intr: true`Nobuyoshi Nakada2019-12-291-0/+5
| | | | https://github.com/ruby/io-console/commit/baaf929041
* [ruby/io-console] Skip Interrupt test on LinuxNobuyoshi Nakada2019-12-181-1/+1
| | | | | | Hangs up only in ruby/ruby on Travis-CI. https://github.com/ruby/io-console/commit/de39aa6dd6
* [ruby/io-console] Set raw mode strictly same as cfmakerawNobuyoshi Nakada2019-12-181-1/+1
| | | | | | | | | | * Default VMIN and VTIME to minimum input. * Disable parity check bits explicitly. * Disable all bits for flow control on input. Co-Authored-By: NARUSE, Yui <naruse@airemix.jp> https://github.com/ruby/io-console/commit/5ce201a686
* [ruby/io-console] Skip interruptNobuyoshi Nakada2019-12-181-1/+1
| | | | https://github.com/ruby/io-console/commit/8ed5a2bcc3
* [ruby/io-console] Timeout in the child processNobuyoshi Nakada2019-12-171-2/+3
| | | | https://github.com/ruby/io-console/commit/b8411689a5
* [ruby/io-console] Use IO.console instead of STDINNobuyoshi Nakada2019-12-171-3/+4
| | | | https://github.com/ruby/io-console/commit/9e3ec5b936
* [ruby/io-console] Disable implementation-defined special control charactersNobuyoshi Nakada2019-12-171-0/+10
| | | | | | In raw mode with interrupt enabled. https://github.com/ruby/io-console/commit/e9e8e3ff17
* [ruby/io-console] Added the test for intr optionNobuyoshi Nakada2019-12-171-0/+36
| | | | https://github.com/ruby/io-console/commit/4f01db102d
* test/io/console/test_io_console.rb: add a memo for the mysterious hackYusuke Endoh2019-12-051-1/+11
|
* test/io/console/test_io_console.rb: Try the hack for SolarisYusuke Endoh2019-12-051-1/+1
| | | | | | I'm not entirely sure why, but test_set_winsize_console gets stuck on Solaris (and if I recall, macOS). I found a hack for FreeBSD, so I want to give it a try on Solaris too.
* Wait for the main thread to start reading by QueueNobuyoshi Nakada2019-12-021-0/+5
| | | | | Otherwise, the written data to pty before the reading started may be just lost.
* Revert "[ruby/io-console] Skip cursor position test on Solaris"Kazuhiro NISHIYAMA2019-09-251-1/+0
| | | | This reverts commit 5294ded681992ced2ecbd31c814b63265d2f591e.
* [ruby/io-console] Unique paths to be addedNobuyoshi Nakada2019-09-251-0/+1
| | | | https://github.com/ruby/io-console/commit/a3ad851b6c
* [ruby/io-console] Load the current librariesNobuyoshi Nakada2019-09-251-1/+3
| | | | https://github.com/ruby/io-console/commit/ab7653c543
* [ruby/io-console] Skip cursor position test on SolarisNobuyoshi Nakada2019-09-251-0/+1
| | | | | | It results in a mysterious failure. https://github.com/ruby/io-console/commit/e3543c3da4
* [ruby/io-console] Made cursor position 0-originNobuyoshi Nakada2019-09-241-0/+20
| | | | https://github.com/ruby/io-console/commit/9377e37295
* Suppress uninitialized instance variable warningsnobu2018-12-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/io/console/test_io_console.rb: fix short read failuresnormal2018-08-091-14/+14
| | | | | | | | Running with TESTS=--no-retry, I sometimes get short reads leading to failures due to the use of IO#readpartial instead of IO#gets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/io/console/test_io_console.rb: fix for systems where PTY is not definednormal2018-06-061-5/+4
| | | | | | | [ruby-core:87420] [Bug #14828] Thanks-to: MSP-Greg (Greg L) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/io/console/test_io_console.rb: ignore TTOU on FreeBSDnormal2018-06-051-0/+16
| | | | | | | I'm not entirely sure why, but SIGTTOU pauses the test when running test-all in parallel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e