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

37 lines
691 B
Ruby
Raw Normal View History

#
# This test file concludes tests which point out known bugs.
# So all tests will cause failure.
#
assert_equal '0', %q{
GC.stress = true
pid = fork {}
Process.wait pid
$?.to_i
}, '[ruby-dev:32404]'
assert_normal_exit %q{
"abcdefghij\xf0".force_encoding("utf-8").reverse.inspect
}, '[ruby-dev:32448]'
assert_equal 'ok', %q{
class C
define_method(:foo) do |arg, &block|
if block then block.call else arg end
end
end
C.new.foo("ng") {"ok"}
}, '[ruby-talk:266422]'
assert_equal 'ok', %q{
STDERR.reopen(STDOUT)
class C
define_method(:foo) do |&block|
block.call if block
end
result = "ng"
new.foo() {result = "ok"}
result
end
}