mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_m17n.rb: Make the debugging code print to stderr
The test is executed with -j8, so printing someting to stdout may break.
This commit is contained in:
parent
f757330367
commit
1c05682929
1 changed files with 15 additions and 15 deletions
|
@ -315,27 +315,27 @@ class TestM17N < Test::Unit::TestCase
|
|||
begin
|
||||
"abc".encode(Encoding.default_external)
|
||||
rescue Encoding::CompatibilityError
|
||||
p :debug_1
|
||||
p $!
|
||||
p *$!.backtrace
|
||||
p "abc".encoding
|
||||
p Encoding.default_external
|
||||
$stderr.puts :debug_1.inspect
|
||||
$stderr.puts $!.inspect
|
||||
$stderr.puts *$!.backtrace
|
||||
$stderr.puts "abc".encoding.inspect
|
||||
$stderr.puts Encoding.default_external.inspect
|
||||
end
|
||||
begin
|
||||
[o].inspect
|
||||
rescue Encoding::CompatibilityError
|
||||
p :debug_2
|
||||
p $!
|
||||
p *$!.backtrace
|
||||
p "abc".encoding
|
||||
p Encoding.default_external
|
||||
$stderr.puts :debug_2.inspect
|
||||
$stderr.puts $!.inspect
|
||||
$stderr.puts *$!.backtrace
|
||||
$stderr.puts "abc".encoding.inspect
|
||||
$stderr.puts Encoding.default_external.inspect
|
||||
begin
|
||||
p o.inspect
|
||||
p :debug_3
|
||||
$stderr.puts o.inspect.inspect
|
||||
$stderr.puts :debug_3.inspect
|
||||
rescue Encoding::CompatibilityError
|
||||
p :debug_4
|
||||
p $!
|
||||
p *$!.backtrace
|
||||
$stderr.puts :debug_4.inspect
|
||||
$stderr.puts $!.inspect
|
||||
$stderr.puts *$!.backtrace
|
||||
end
|
||||
end
|
||||
# debugging code end
|
||||
|
|
Loading…
Add table
Reference in a new issue