2007-08-29 07:48:19 +04:00
|
|
|
#
|
|
|
|
# This test file concludes tests which point out known bugs.
|
|
|
|
# So all tests will cause failure.
|
|
|
|
#
|
2007-12-29 07:27:39 +03:00
|
|
|
|
2008-01-03 14:26:10 +03:00
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class X < RuntimeError;end
|
|
|
|
x = [X]
|
|
|
|
begin
|
|
|
|
raise X
|
|
|
|
rescue *x
|
|
|
|
:ok
|
|
|
|
end
|
|
|
|
}, '[ruby-core:14537]'
|
2007-12-29 07:27:39 +03:00
|
|
|
|
2008-01-05 18:40:17 +03:00
|
|
|
# test is not written...
|
|
|
|
# * [ruby-dev:31819] rb_clear_cache_by_class
|
|
|
|
# * [ruby-dev:31820] valgrind set_trace_func
|
2008-01-07 04:56:16 +03:00
|
|
|
|
|
|
|
|
|
|
|
assert_equal 'ok', %q{
|
|
|
|
while true
|
|
|
|
*, z = 1
|
|
|
|
break
|
|
|
|
end
|
|
|
|
:ok
|
|
|
|
}, '[ruby-dev:32892]'
|
|
|
|
|
|
|
|
|
|
|
|
assert_equal 'ok', %q{
|
|
|
|
1.times do
|
|
|
|
[
|
|
|
|
1, 2, 3, 4, 5, 6, 7, 8,
|
|
|
|
begin
|
|
|
|
false ? next : p
|
|
|
|
break while true
|
|
|
|
end
|
|
|
|
]
|
|
|
|
end
|
|
|
|
:ok
|
|
|
|
}, '[ruby-dev:32882]'
|
|
|
|
|
|
|
|
|
2008-01-07 10:07:44 +03:00
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class C
|
|
|
|
define_method(:foo) {
|
|
|
|
if block_given?
|
|
|
|
:ng
|
|
|
|
else
|
|
|
|
:ok
|
|
|
|
end
|
|
|
|
}
|
|
|
|
end
|
|
|
|
C.new.foo
|
|
|
|
}, '[ruby-core:14813]'
|
|
|
|
|
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class C
|
|
|
|
define_method(:foo) {
|
|
|
|
if block_given?
|
|
|
|
:ok
|
|
|
|
else
|
|
|
|
:ng
|
|
|
|
end
|
|
|
|
}
|
|
|
|
end
|
|
|
|
C.new.foo {}
|
|
|
|
}, '[ruby-core:14813]'
|