2007-08-28 23:48:19 -04:00
|
|
|
#
|
|
|
|
# This test file concludes tests which point out known bugs.
|
|
|
|
# So all tests will cause failure.
|
|
|
|
#
|
2007-12-28 23:27:39 -05:00
|
|
|
|
2008-01-14 04:45:46 -05:00
|
|
|
# test is not written...
|
|
|
|
flunk '[ruby-dev:31819] rb_clear_cache_by_class'
|
|
|
|
flunk '[ruby-dev:31820] valgrind set_trace_func'
|
2008-01-24 02:16:41 -05:00
|
|
|
flunk '[ruby-dev:32746] Invalid read of size 1'
|
2008-01-14 04:45:46 -05:00
|
|
|
|
2008-01-03 06:26:10 -05:00
|
|
|
assert_equal 'ok', %q{
|
|
|
|
class X < RuntimeError;end
|
|
|
|
x = [X]
|
|
|
|
begin
|
|
|
|
raise X
|
|
|
|
rescue *x
|
|
|
|
:ok
|
|
|
|
end
|
|
|
|
}, '[ruby-core:14537]'
|
2007-12-28 23:27:39 -05:00
|
|
|
|
2008-01-06 20:56:16 -05:00
|
|
|
|
|
|
|
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 02:07:44 -05: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]'
|
2008-01-07 05:01:34 -05:00
|
|
|
|
2008-01-12 11:42:43 -05:00
|
|
|
assert_equal 'true', %{
|
2008-01-14 04:59:58 -05:00
|
|
|
t = Thread.new { loop {} }
|
2008-01-22 21:23:21 -05:00
|
|
|
begin
|
|
|
|
pid = fork {
|
2008-01-12 11:42:43 -05:00
|
|
|
exit t.status != "run"
|
2008-01-22 21:23:21 -05:00
|
|
|
}
|
|
|
|
Process.wait pid
|
|
|
|
$?.success?
|
|
|
|
rescue NotImplementedError
|
|
|
|
true
|
|
|
|
end
|
2008-01-12 11:42:43 -05:00
|
|
|
}
|
|
|
|
|
2008-01-17 12:02:30 -05:00
|
|
|
assert_valid_syntax('1.times {|i|print (42),1;}', '[ruby-list:44479]')
|