Hiroshi SHIBATA
8b4017584b
Use EnvUtil.apply_timeout_scale for test_io_wait.rb
2025-04-30 16:59:16 +09:00
Hiroshi SHIBATA
6bd5a51ab5
Removed Solaris conditions from test files
...
We no longer execute those files with Solaris platforms.
2025-04-02 16:24:47 +09:00
Naoto Ono
db4ea95219
[Bug #20682 ] Add sleep 0.1 to stabilize flaky failures on macOS ( #12829 )
...
[Bug #20682 ] Add `sleep 0.1` to stabilize flaky failures on macOS
2025-02-28 09:32:36 +00:00
Nobuyoshi Nakada
8ec58a91f7
[ruby/io-console] Add IO#ttyname that returns the tty name or nil
...
fdad351501
2024-12-02 08:03:30 +00:00
Nobuyoshi Nakada
4a1ea9b63a
[ruby/io-console] Store console IO in Ractor-local storage
...
Ractor requires a shareable class has shareable constants only, but IO
is not shareable unless frozen.
65e0ff895c
2024-08-31 08:43:59 +00:00
Nobuyoshi Nakada
365ededfdf
[ruby/io-console] io-console is considered Ractor-safe
...
b1adc15af7
2024-08-31 05:46:05 +00:00
Nobuyoshi Nakada
13f04e5beb
[ruby/io-console] Load the built extension library in noctty tests
...
74c78afc24
2024-04-10 09:10:50 +00:00
Nobuyoshi Nakada
86547fd69d
[ruby/io-console] Move the condition to omit to command line option
...
32583460e1
2024-01-30 19:19:23 +09:00
Nobuyoshi Nakada
c2cb5b4463
[ruby/io-console] Move the condition to omit outside the method
...
8b9b5b611a
2024-01-30 19:19:23 +09:00
Takashi Kokubun
cc86fa8416
Skip an unstable test on MinGW
...
This test fails fairly frequently on MinGW:
1959892425 (step)
:11:168
1958562718 (step)
:11:168
and we aren't actively working on stabilizing tests for MinGW.
2023-12-13 09:40:54 -08:00
Nobuyoshi Nakada
818ba30ee9
[ruby/io-console] Avoid the influence of special variable $/
...
5f71354332
2023-08-18 03:55:04 +00:00
Nobuyoshi Nakada
540cf43205
[ruby/io-console] Enable getpass
methods always
...
57f9649df4
2023-08-18 03:55:02 +00:00
Samuel Williams
d20bd06a97
Remove require 'io/wait'
where it's no longer necessary. ( #6932 )
...
* Remove `require 'io/wait'` as it's part of core now.
* Update ruby specs using version gates.
* Add note about why it's conditional.
2022-12-15 11:37:01 +13:00
Nobuyoshi Nakada
21ed929e15
[ruby/io-console] Omit on JRuby
...
9122c181eb
2022-12-02 10:33:36 +00:00
Nobuyoshi Nakada
678bcfcaa6
[ruby/io-console] Check rawmode option names strictly
...
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.
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 )
...
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+.
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
...
a7bfbfa049
2022-01-12 11:02:24 +09:00
Hiroshi SHIBATA
bf2bd6dc22
[ruby/io-wait] Use omit instead of skip for test-unit
...
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
...
e8e1e99d4c
2021-11-16 20:25:44 +09:00
Nobuyoshi Nakada
d305ae5f04
[ruby/io-wait] Use omit
as per test-unit
...
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
...
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
ba338b4764
2021-03-07 09:54:35 +09:00
Nobuyoshi Nakada
ef9bde6516
[ruby/io-wait] Refined uncommon device type tests
...
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
a486b72e5e
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.
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.
4a21610ece
2021-02-05 12:01:38 +09:00
Charles Oliver Nutter
8960d6b5bd
[ruby/io-console] Add console.rb to search for paths
...
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.
8817d07951
639cce89de
2021-02-05 11:45:04 +09:00
Nobuyoshi Nakada
ead8d89bd7
[ruby/io-console] Ignore chomp! result and return the modified string
...
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>'
```
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.
...
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
...
20200509
T100003Z.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
...
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.
fe117b89e0
2020-05-09 14:46:08 +09:00