summaryrefslogtreecommitdiff
path: root/test/io
Commit message (Collapse)AuthorAgeFilesLines
* Remove `require 'io/wait'` where it's no longer necessary. (#6932)Samuel Williams2022-12-153-6/+3
| | | | | | | * Remove `require 'io/wait'` as it's part of core now. * Update ruby specs using version gates. * Add note about why it's conditional.
* [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.
* Skip test_wait on MinGW CITakashi Kokubun2022-09-171-0/+1
| | | | | | This test has been unstable, and it seems like we're not interested in fixing that for MinGW. https://github.com/ruby/ruby/actions/runs/3073317191/jobs/4965373284
* 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
* [ruby/io-wait] Fix usage of `assert_raises` -> `assert_raise`. ↵Samuel Williams2022-06-251-2/+2
| | | | | | (https://github.com/ruby/io-wait/pull/20) https://github.com/ruby/io-wait/commit/c5c6abbb5c
* * remove trailing spaces. [ci skip]git2022-06-251-2/+2
|
* [ruby/io-wait] Don't add `IO#wait*` methods when `RUBY_IO_WAIT_METHODS` is ↵Samuel Williams2022-06-251-0/+28
| | | | | | | | | | defined by Ruby. (https://github.com/ruby/io-wait/pull/19) * Fix return value compatibility with Ruby 2.x. * Don't add `IO#wait*` methods in Ruby 3.2+. https://github.com/ruby/io-wait/commit/54c504d089
* 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.
* [ruby/io-nonblock] Use omit instead of skip for test-unitHiroshi SHIBATA2022-01-121-1/+1
| | | | https://github.com/ruby/io-nonblock/commit/a7bfbfa049
* [ruby/io-wait] Use omit instead of skip for test-unitHiroshi SHIBATA2022-01-121-1/+1
| | | | https://github.com/ruby/io-wait/commit/75543ab1bc
* 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
|
* [ruby/io-wait] Disable ractor test which is meaningless on earlier versionsNobuyoshi Nakada2021-11-161-5/+1
| | | | https://github.com/ruby/io-wait/commit/e8e1e99d4c
* [ruby/io-wait] Use `omit` as per test-unitNobuyoshi Nakada2021-11-161-1/+1
| | | | https://github.com/ruby/io-wait/commit/1f59f7b02f
* 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-wait] Declare as Ractor-safeNobuyoshi Nakada2021-03-071-0/+22
| | | | | | Fixes https://bugs.ruby-lang.org/issues/17659 https://github.com/ruby/io-wait/commit/ba338b4764
* [ruby/io-wait] Refined uncommon device type testsNobuyoshi Nakada2021-03-071-17/+16
| | | | https://github.com/ruby/io-wait/commit/0c73ebcf5d
* [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
* Add explicitly require for Dir.mktmpdirHiroshi SHIBATA2020-07-301-0/+1
|
* 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
* Scale sleeping times to wait for the OS operationsNobuyoshi Nakada2019-12-241-0/+4
|
* Synchronize with a Queue instead of sleepingNobuyoshi Nakada2019-12-241-4/+12
|
* Revert "Scale sleeping times"Koichi Sasada2019-12-241-4/+0
| | | | | | | | This reverts commit e57d6194218efc73c30f3fed9dd321d2e357030b. Test fails: http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2518563 http://ci.rvm.jp/results/trunk-gc_compact@silicon-docker/2518533
* Scale sleeping timesNobuyoshi Nakada2019-12-241-0/+4
|
* [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