Граф коммитов

165 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 21ed929e15 [ruby/io-console] Omit on JRuby
https://github.com/ruby/io-console/commit/9122c181eb
2022-12-02 10:33:36 +00:00
Nobuyoshi Nakada 678bcfcaa6 [ruby/io-console] Check rawmode option names strictly
https://github.com/ruby/io-console/commit/aa8fc7e947
2022-12-02 10:33:35 +00:00
Alan Wu 7f269a3c2d Fix io/console test for --with-static-linked-ext
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.
2022-11-18 18:50:34 -05:00
Takashi Kokubun 1825d3673f
Skip test_wait on MinGW CI
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
2022-09-17 22:08:36 +09:00
Hiroshi SHIBATA 892fe9bbba
omit all assertions at TestIO_Console#test_intr when running with FreeBSD 2022-08-23 12:49:46 +09:00
Hiroshi SHIBATA d448ecc7b1
Fix the missing brackets 2022-07-28 19:25:52 +09:00
Hiroshi SHIBATA 202ce7de01
test_io_console.rbL399 is also randomly failing same as bfc697f1e2 2022-07-28 19:14:01 +09:00
Samuel Williams d281347abb [ruby/io-wait] Fix usage of `assert_raises` -> `assert_raise`. (https://github.com/ruby/io-wait/pull/20)
https://github.com/ruby/io-wait/commit/c5c6abbb5c
2022-06-25 17:12:26 +09:00
git 7e68762446 * remove trailing spaces. [ci skip] 2022-06-25 16:22:07 +09:00
Samuel Williams f9c8d80883 [ruby/io-wait] Don't add `IO#wait*` methods when `RUBY_IO_WAIT_METHODS` is 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
2022-06-25 16:21:54 +09:00
Yusuke Endoh bfc697f1e2 test/io/console/test_io_console.rb: parens needed 2022-03-08 17:40:02 +09:00
Yusuke Endoh 17e09f033c Skip three tests on FreeBSD 13
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.
2022-03-08 16:06:37 +09:00
Hiroshi SHIBATA dcb02cb28a
[ruby/io-nonblock] Use omit instead of skip for test-unit
https://github.com/ruby/io-nonblock/commit/a7bfbfa049
2022-01-12 11:02:24 +09:00
Hiroshi SHIBATA bf2bd6dc22 [ruby/io-wait] Use omit instead of skip for test-unit
https://github.com/ruby/io-wait/commit/75543ab1bc
2022-01-12 10:53:57 +09:00
Kazuhiro NISHIYAMA d5836db1b3
Fix `Leaked file descriptor: TestIO_Console#test_console_kw`
```
Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty>
```
2022-01-05 09:05:52 +09:00
Samuel Williams f27eb8148f
Sync io-console gem. 2021-12-29 13:27:40 +13:00
Nobuyoshi Nakada dc5512243b [ruby/io-wait] Disable ractor test which is meaningless on earlier versions
https://github.com/ruby/io-wait/commit/e8e1e99d4c
2021-11-16 20:25:44 +09:00
Nobuyoshi Nakada d305ae5f04 [ruby/io-wait] Use `omit` as per test-unit
https://github.com/ruby/io-wait/commit/1f59f7b02f
2021-11-16 20:25:41 +09:00
Koichi Sasada 38c555a315 show encoding for each path 2021-11-14 02:41:30 +09:00
Yusuke Endoh 4d8d8c9d49 test/io/console/test_io_console.rb: dump debug output to stderr
make test-all in parallel mode seems to hide stdout
2021-11-14 02:35:03 +09:00
Yusuke Endoh 3aa62b455c test/io/console/test_io_console.rb: add debug code
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
```
2021-11-12 16:23:00 +09:00
Nobuyoshi Nakada b9f7286fe9
[ruby/io-console] Skip Interrupt test on Solaris too
https://github.com/ruby/io-console/commit/48db3616da
2021-10-11 11:33:15 +09:00
Nobuyoshi Nakada f6d5de8f33 [ruby/io-wait] Declare as Ractor-safe
Fixes https://bugs.ruby-lang.org/issues/17659

https://github.com/ruby/io-wait/commit/ba338b4764
2021-03-07 09:54:35 +09:00
Nobuyoshi Nakada ef9bde6516 [ruby/io-wait] Refined uncommon device type tests
https://github.com/ruby/io-wait/commit/0c73ebcf5d
2021-03-07 09:54:35 +09:00
Charles Oliver Nutter abf71864a5
[ruby/io-console] Mark all tests that use run_pty as pend on JRuby
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
2021-02-05 12:29:33 +09:00
Charles Oliver Nutter a1cc044ea1
[ruby/io-console] Use omit instead of skip
This test runs with test/unit now, which defines omit instead of
skip.

https://github.com/ruby/io-console/commit/bd731d0b8d
2021-02-05 12:01:38 +09:00
Charles Oliver Nutter 2a764fe764
[ruby/io-console] Skip test on JRuby
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
2021-02-05 12:01:38 +09:00
Charles Oliver Nutter 8960d6b5bd
[ruby/io-console] Add console.rb to search for paths
https://github.com/ruby/io-console/commit/74567376c4
2021-02-05 12:01:38 +09:00
Nobuyoshi Nakada 9ef7780b09
[ruby/io-console] Run subprocesses without test libraries
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
2021-02-05 11:45:04 +09:00
Nobuyoshi Nakada ead8d89bd7 [ruby/io-console] Ignore chomp! result and return the modified string
https://github.com/ruby/io-console/commit/09e5ccc729
2021-01-05 21:26:11 +09:00
Nobuyoshi Nakada a79966743c [ruby/io-console] Fix timeout type error (#18)
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
2020-10-11 02:00:24 +09:00
Leam Hall f4b9e94317
[ruby/io-console] Bug 17128: In test_set_winsize_console, wrapped re-size in a begin-rescue-else.
https://github.com/ruby/io-console/commit/a22333c33a
2020-08-27 23:46:02 +09:00
Hiroshi SHIBATA ec1ab1d465
Add explicitly require for Dir.mktmpdir 2020-07-30 21:01:22 +09:00
Nobuyoshi Nakada 883214f8e9
Use %w instead of %i not to create unused IDs 2020-05-09 20:13:30 +09:00
Yusuke Endoh 595e74ae4b test/io/console/test_io_console.rb: Rescue Errno::ENXIO for Solaris
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>.
```
2020-05-09 20:07:38 +09:00
Nobuyoshi Nakada 581763d14c [ruby/io-console] Fails with EBADF on mingw
https://github.com/ruby/io-console/commit/530cec574c
2020-05-09 14:51:43 +09:00
Nobuyoshi Nakada d7a59e2ffe
[ruby/io-console] Expanded expected errors
May fail with ENOTTY instead of ENODEV.

https://github.com/ruby/io-console/commit/fe117b89e0
2020-05-09 14:46:08 +09:00
Nobuyoshi Nakada cc9bc14530 [ruby/io-console] Added test for failed path
https://github.com/ruby/io-console/commit/06a540f9b4
2020-05-09 13:57:04 +09:00
Charles Oliver Nutter 569f56e0f7 [ruby/io-console] Filter Ruby engine name rather than just /ruby/
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
2020-01-18 00:15:00 +09:00
Nobuyoshi Nakada 31e2f03512 [ruby/io-console] Enable only interrupt bits on `intr: true`
https://github.com/ruby/io-console/commit/baaf929041
2019-12-29 16:26:22 +09:00
Nobuyoshi Nakada a3c5dbf291
Scale sleeping times to wait for the OS operations 2019-12-24 18:53:14 +09:00
Nobuyoshi Nakada 81504e83e7
Synchronize with a Queue instead of sleeping 2019-12-24 15:48:08 +09:00
Koichi Sasada 47ad57f245 Revert "Scale sleeping times"
This reverts commit e57d619421.

Test fails:
http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2518563
http://ci.rvm.jp/results/trunk-gc_compact@silicon-docker/2518533
2019-12-24 15:38:46 +09:00
Nobuyoshi Nakada e57d619421
Scale sleeping times 2019-12-24 14:56:17 +09:00
Nobuyoshi Nakada c147eeff7c [ruby/io-console] Skip Interrupt test on Linux
Hangs up only in ruby/ruby on Travis-CI.

https://github.com/ruby/io-console/commit/de39aa6dd6
2019-12-18 13:30:52 +09:00
Nobuyoshi Nakada 77e3078ede [ruby/io-console] Set raw mode strictly same as cfmakeraw
* 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
2019-12-18 10:33:05 +09:00
Nobuyoshi Nakada 07ed8f2f91 [ruby/io-console] Skip interrupt
https://github.com/ruby/io-console/commit/8ed5a2bcc3
2019-12-18 00:08:04 +09:00
Nobuyoshi Nakada 905a926ea8 [ruby/io-console] Timeout in the child process
https://github.com/ruby/io-console/commit/b8411689a5
2019-12-17 23:55:24 +09:00
Nobuyoshi Nakada 4b7d27ca0d [ruby/io-console] Use IO.console instead of STDIN
https://github.com/ruby/io-console/commit/9e3ec5b936
2019-12-17 23:55:22 +09:00
Nobuyoshi Nakada 81eb2d16ef
[ruby/io-console] Disable implementation-defined special control characters
In raw mode with interrupt enabled.

https://github.com/ruby/io-console/commit/e9e8e3ff17
2019-12-17 13:55:04 +09:00