2007-08-29 03:48:19 +00:00
|
|
|
#
|
|
|
|
# This test file concludes tests which point out known bugs.
|
|
|
|
# So all tests will cause failure.
|
|
|
|
#
|
2007-12-29 04:27:39 +00:00
|
|
|
|
2008-01-07 07:07:44 +00:00
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class C
|
|
|
|
define_method(:foo) {
|
|
|
|
if block_given?
|
|
|
|
:ok
|
2008-01-25 18:02:01 +00:00
|
|
|
else
|
|
|
|
:ng
|
2008-01-07 07:07:44 +00:00
|
|
|
end
|
|
|
|
}
|
|
|
|
end
|
2008-01-25 18:02:01 +00:00
|
|
|
C.new.foo {}
|
2008-01-07 07:07:44 +00:00
|
|
|
}, '[ruby-core:14813]'
|
|
|
|
|
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class C
|
|
|
|
define_method(:foo) {
|
|
|
|
if block_given?
|
|
|
|
:ng
|
2008-01-25 18:02:01 +00:00
|
|
|
else
|
|
|
|
:ok
|
2008-01-07 07:07:44 +00:00
|
|
|
end
|
|
|
|
}
|
|
|
|
end
|
2008-01-25 18:02:01 +00:00
|
|
|
C.new.foo
|
2008-01-07 07:07:44 +00:00
|
|
|
}, '[ruby-core:14813]'
|
2008-01-07 10:01:34 +00:00
|
|
|
|
2008-01-25 18:02:01 +00:00
|
|
|
# test is not written...
|
|
|
|
flunk '[ruby-dev:31819] rb_clear_cache_by_class'
|
|
|
|
flunk '[ruby-dev:31820] valgrind set_trace_func'
|
|
|
|
flunk '[ruby-dev:32746] Invalid read of size 1'
|
|
|
|
|
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class X < RuntimeError;end
|
|
|
|
x = [X]
|
2008-01-23 02:23:21 +00:00
|
|
|
begin
|
2008-01-25 18:02:01 +00:00
|
|
|
raise X
|
|
|
|
rescue *x
|
|
|
|
:ok
|
2008-01-23 02:23:21 +00:00
|
|
|
end
|
2008-01-25 18:02:01 +00:00
|
|
|
}, '[ruby-core:14537]'
|
2008-01-12 16:42:43 +00:00
|
|
|
|
2008-01-17 17:02:30 +00:00
|
|
|
assert_valid_syntax('1.times {|i|print (42),1;}', '[ruby-list:44479]')
|