1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
```
This commit is contained in:
Yusuke Endoh 2021-11-12 16:19:30 +09:00
parent a046081838
commit 3aa62b455c

View file

@ -7,7 +7,12 @@ rescue LoadError
end
class TestIO_Console < Test::Unit::TestCase
PATHS = $LOADED_FEATURES.grep(%r"/io/console(?:\.#{RbConfig::CONFIG['DLEXT']}|\.rb|/\w+\.rb)\z") {$`}
begin
PATHS = $LOADED_FEATURES.grep(%r"/io/console(?:\.#{RbConfig::CONFIG['DLEXT']}|\.rb|/\w+\.rb)\z") {$`}
rescue Encoding::CompatibilityError
p $LOADED_FEATURES
raise
end
PATHS.uniq!
# FreeBSD seems to hang on TTOU when running parallel tests