ruby-changes:2514
From: ko1@a...
Date: 23 Nov 2007 17:33:54 +0900
Subject: [ruby-changes:2514] ko1 - Ruby:r14005 (trunk): * bootstraptest/test_knownbug.rb: move solved tests.
ko1 2007-11-23 17:33:32 +0900 (Fri, 23 Nov 2007)
New Revision: 14005
Added files:
trunk/bootstraptest/test_io.rb
trunk/bootstraptest/test_marshal.rb
Modified files:
trunk/ChangeLog
trunk/bootstraptest/test_knownbug.rb
trunk/bootstraptest/test_objectspace.rb
trunk/test/ruby/test_integer.rb
trunk/test/ruby/test_regexp.rb
Log:
* bootstraptest/test_knownbug.rb: move solved tests.
* bootstraptest/test_io.rb, test_marshal.rb, test_objectspace.rb:
ditto.
* test/ruby/test_integer.rb, test_regexp.rb: ditto.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_marshal.rb?revision=14005&view=markup
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_io.rb?revision=14005&view=markup
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14005&r2=14004
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_objectspace.rb?r1=14005&r2=14004
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_regexp.rb?r1=14005&r2=14004
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_integer.rb?r1=14005&r2=14004
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_knownbug.rb?r1=14005&r2=14004
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14004)
+++ ChangeLog (revision 14005)
@@ -1,3 +1,12 @@
+Fri Nov 23 17:26:11 2007 Koichi Sasada <ko1@a...>
+
+ * bootstraptest/test_knownbug.rb: move solved tests.
+
+ * bootstraptest/test_io.rb, test_marshal.rb, test_objectspace.rb:
+ ditto.
+
+ * test/ruby/test_integer.rb, test_regexp.rb: ditto.
+
Fri Nov 23 15:59:04 2007 Tanaka Akira <akr@f...>
* struct.c (rb_struct_alloc_noinit): new function.
Index: bootstraptest/test_objectspace.rb
===================================================================
--- bootstraptest/test_objectspace.rb (revision 14004)
+++ bootstraptest/test_objectspace.rb (revision 14005)
@@ -11,3 +11,23 @@
o.inspect if defined?(o.inspect)
}
}, '[ruby-dev:31911]'
+
+assert_normal_exit %q{
+ ary = (1..10).to_a
+ ary.permutation(2) {|x|
+ if x == [1,2]
+ ObjectSpace.each_object(String) {|s|
+ s.clear if s.length == 40 || s.length == 80
+ }
+ end
+ }
+}, '[ruby-dev:31982]'
+
+assert_normal_exit %q{
+ ary = (1..100).to_a
+ ary.permutation(2) {|x|
+ if x == [1,2]
+ ObjectSpace.each_object(Array) {|o| o.clear if o == ary && o.object_id != ary.object_id }
+ end
+ }
+}, '[ruby-dev:31985]'
Index: bootstraptest/test_marshal.rb
===================================================================
--- bootstraptest/test_marshal.rb (revision 0)
+++ bootstraptest/test_marshal.rb (revision 14005)
@@ -0,0 +1,5 @@
+
+assert_normal_exit %q{
+ Marshal.load(Marshal.dump({"k"=>"v"}), lambda {|v| })
+}
+
Index: bootstraptest/test_knownbug.rb
===================================================================
--- bootstraptest/test_knownbug.rb (revision 14004)
+++ bootstraptest/test_knownbug.rb (revision 14005)
@@ -3,49 +3,11 @@
# So all tests will cause failure.
#
-assert_finish 1, %q{
- r, w = IO.pipe
- t1 = Thread.new { r.sysread(1) }
- t2 = Thread.new { r.sysread(1) }
- sleep 0.1
- w.write "a"
- sleep 0.1
- w.write "a"
-}, '[ruby-dev:31866]'
-
-assert_normal_exit %q{
- Marshal.load(Marshal.dump({"k"=>"v"}), lambda {|v| })
-}
-
assert_not_match /method_missing/, %q{
STDERR.reopen(STDOUT)
variable_or_mehtod_not_exist
}
-assert_normal_exit %q{
- ary = (1..10).to_a
- ary.permutation(2) {|x|
- if x == [1,2]
- ObjectSpace.each_object(String) {|s|
- s.clear if s.length == 40 || s.length == 80
- }
- end
- }
-}, '[ruby-dev:31982]'
-
-assert_normal_exit %q{
- ary = (1..100).to_a
- ary.permutation(2) {|x|
- if x == [1,2]
- ObjectSpace.each_object(Array) {|o| o.clear if o == ary && o.object_id != ary.object_id }
- end
- }
-}, '[ruby-dev:31985]'
-
-assert_normal_exit %q{
- Regexp.union("a", "a")
-}
-
assert_equal 'ok', %q{
begin
Regexp.union(
@@ -58,14 +20,6 @@
end
}
-assert_equal 'ok', %q{
- 0**-1 == 0 ? :ng : :ok
-}
-
-assert_equal '(?-mix:\000)', %q{
- Regexp.new("\0")
-}
-
assert_normal_exit %q{
STDERR.reopen(STDOUT)
require 'yaml'
@@ -85,3 +39,4 @@
C.new.to_enum.each {|*v| vs2 << v }
vs1 == vs2 ? :ok : :ng
}, '[ruby-dev:32329]'
+
Index: bootstraptest/test_io.rb
===================================================================
--- bootstraptest/test_io.rb (revision 0)
+++ bootstraptest/test_io.rb (revision 14005)
@@ -0,0 +1,9 @@
+assert_finish 1, %q{
+ r, w = IO.pipe
+ t1 = Thread.new { r.sysread(1) }
+ t2 = Thread.new { r.sysread(1) }
+ sleep 0.1
+ w.write "a"
+ sleep 0.1
+ w.write "a"
+}, '[ruby-dev:31866]'
Index: test/ruby/test_regexp.rb
===================================================================
--- test/ruby/test_regexp.rb (revision 14004)
+++ test/ruby/test_regexp.rb (revision 14005)
@@ -28,4 +28,13 @@
def test_ruby_dev_31309
assert_equal('Ruby', 'Ruby'.sub(/[^a-z]/i, '-'))
end
+
+ def test_assert_normal_exit
+ # moved from knownbug. It caused core.
+ Regexp.union("a", "a")
+ end
+
+ def test_to_s
+ assert_equal '(?-mix:\000)', Regexp.new("\0").to_s
+ end
end
Index: test/ruby/test_integer.rb
===================================================================
--- test/ruby/test_integer.rb (revision 14004)
+++ test/ruby/test_integer.rb (revision 14005)
@@ -241,6 +241,8 @@
end
}
}
+
+ assert_equal(0**-1 == 0, false)
end
def test_not
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml