summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-03-22 22:34:49 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-03-22 22:34:49 +0900
commit095e9f57af30fc286ba66557d86f080003ab6d5a (patch)
tree8c0eae821ed531fa5922c846033be70408c55e2d /test/ruby/test_m17n.rb
parent6ab7d439f8d43234004e1760aa88a98c29129006 (diff)
test/ruby/test_m17n.rb: Add a temporal code for debugging
http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411 ``` I, [2020-03-22T22:15:50.761950 #23076] INFO -- : 1) Error: I, [2020-03-22T22:15:50.761963 #23076] INFO -- : TestM17N#test_object_inspect_external: I, [2020-03-22T22:15:50.761974 #23076] INFO -- : Encoding::CompatibilityError: incompatible character encodings: UTF-8 and UTF-16BE ```
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index 6c7d0e6bae..c21f411643 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -310,6 +310,36 @@ class TestM17N < Test::Unit::TestCase
def o.inspect
"abc".encode(Encoding.default_external)
end
+
+ # debugging code for http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411
+ begin
+ "abc".encode(Encoding.default_external)
+ rescue Encoding::CompatibilityError
+ p :debug_1
+ p $!
+ p *$!.backtrace
+ p "abc".encoding
+ p Encoding.default_external
+ end
+ begin
+ [o].inspect
+ rescue Encoding::CompatibilityError
+ p :debug_2
+ p $!
+ p *$!.backtrace
+ p "abc".encoding
+ p Encoding.default_external
+ begin
+ p o.inspect
+ p :debug_3
+ rescue Encoding::CompatibilityError
+ p :debug_4
+ p $!
+ p *$!.backtrace
+ end
+ end
+ # debugging code end
+
assert_equal '[abc]', [o].inspect
Encoding.default_external = Encoding::US_ASCII