summaryrefslogtreecommitdiff
path: root/test/io
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-11-12 16:19:30 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-11-12 16:23:00 +0900
commit3aa62b455caf4926fd203878eca71b5281f10edf (patch)
tree78703a74b257f8dcc8cb61906953b6c5191d6005 /test/io
parenta046081838b4e4f28b54c9a5a8dfa413dc63096a (diff)
downloadruby-3aa62b455caf4926fd203878eca71b5281f10edf.tar.gz
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 ```
Diffstat (limited to 'test/io')
-rw-r--r--test/io/console/test_io_console.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index d119ec23e0..00727a14b4 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -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