summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_knownbug.rb64
-rw-r--r--bootstraptest/test_syntax.rb12
-rw-r--r--bootstraptest/test_thread.rb1
3 files changed, 31 insertions, 46 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb
index 69678e8..82944c7 100644
--- a/bootstraptest/test_knownbug.rb
+++ b/bootstraptest/test_knownbug.rb
@@ -3,73 +3,45 @@
# So all tests will cause failure.
#
-# 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]
- begin
- raise X
- rescue *x
- :ok
- end
-}, '[ruby-core:14537]'
-
-
-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]'
-
-
assert_equal 'ok', %q{
class C
define_method(:foo) {
if block_given?
- :ng
- else
:ok
+ else
+ :ng
end
}
end
- C.new.foo
+ C.new.foo {}
}, '[ruby-core:14813]'
assert_equal 'ok', %q{
class C
define_method(:foo) {
if block_given?
- :ok
- else
:ng
+ else
+ :ok
end
}
end
- C.new.foo {}
+ C.new.foo
}, '[ruby-core:14813]'
-assert_equal 'true', %{
- t = Thread.new { loop {} }
+# 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]
begin
- pid = fork {
- exit t.status != "run"
- }
- Process.wait pid
- $?.success?
- rescue NotImplementedError
- true
+ raise X
+ rescue *x
+ :ok
end
-}
+}, '[ruby-core:14537]'
assert_valid_syntax('1.times {|i|print (42),1;}', '[ruby-list:44479]')
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index ed47d59..1c5121c 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -746,3 +746,15 @@ assert_normal_exit %q{
end
}, 'reported by Yusuke ENDOH'
+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]'
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index 626d671..43bb2fe 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -200,6 +200,7 @@ rescue
100
end
}, '[ruby-dev:31371]'
+
assert_equal 'true', %{
t = Thread.new { loop {} }
begin