summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--bootstraptest/test_knownbug.rb14
-rw-r--r--test/ruby/test_sprintf.rb4
-rw-r--r--test/yaml/test_yaml.rb13
4 files changed, 25 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 6023003103..2c80e0b192 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Dec 1 14:36:05 2007 Koichi Sasada <ko1@atdot.net>
+
+ * bootstraptest/test_knownbug.rb: move fixed bugs.
+
+ * test/ruby/test_sprintf.rb: ditto.
+
+ * test/yaml/test_yaml.rb: ditto.
+
Sat Dec 1 13:24:47 2007 Koichi Sasada <ko1@atdot.net>
* insnhelper.ci (vm_yield_with_cfunc): fix to passing argc on third
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb
index c4104b666c..b97a08d928 100644
--- a/bootstraptest/test_knownbug.rb
+++ b/bootstraptest/test_knownbug.rb
@@ -3,17 +3,3 @@
# So all tests will cause failure.
#
-$:.unshift File.join(File.dirname(__FILE__), "../.ext/#{RUBY_PLATFORM}")
-assert_normal_exit %q{
- STDERR.reopen(STDOUT)
- require 'yaml'
- YAML.load("2000-01-01 00:00:00.#{"0"*1000} +00:00\n")
-}, '[ruby-core:13735]'
-
-assert_equal '..f00000000', %q{
- sprintf("%x", -2**32)
-}, '[ruby-dev:32351]'
-
-assert_equal "..101111111111111111111111111111111", %q{
- sprintf("%b", -2147483649)
-}, '[ruby-dev:32365]'
diff --git a/test/ruby/test_sprintf.rb b/test/ruby/test_sprintf.rb
index 01b7b904e9..7d6cab76f1 100644
--- a/test/ruby/test_sprintf.rb
+++ b/test/ruby/test_sprintf.rb
@@ -141,6 +141,10 @@ class TestSprintf < Test::Unit::TestCase
assert_equal("-0000Inf", sprintf("% 08f", -inf))
assert_equal("-Inf ", sprintf("%- 08f", -inf))
assert_equal("-0000Inf", sprintf("%+ 08f", -inf))
+ assert_equal('..f00000000',
+ sprintf("%x", -2**32), '[ruby-dev:32351]')
+ assert_equal("..101111111111111111111111111111111",
+ sprintf("%b", -2147483649), '[ruby-dev:32365]')
end
def test_invalid
diff --git a/test/yaml/test_yaml.rb b/test/yaml/test_yaml.rb
index 77602c1123..1aebfd30cc 100644
--- a/test/yaml/test_yaml.rb
+++ b/test/yaml/test_yaml.rb
@@ -34,6 +34,14 @@ class YAML_Unit_Tests < Test::Unit::TestCase
end
def assert_cycle( obj )
+ if Time === obj
+ x = YAML::load( obj.to_yaml )
+ y = obj
+ STDERR.puts [y.tv_sec, y.tv_usec, y.tv_nsec].inspect
+ STDERR.puts [x.tv_sec, x.tv_usec, x.tv_nsec].inspect
+ STDERR.puts [obj.<=>(x)]
+ STDERR.puts [obj.eql?(x)].inspect
+ end
assert_equal( obj, YAML::load( obj.to_yaml ) )
end
@@ -1280,6 +1288,11 @@ EOY
1000.times { |i| omap["key_#{i}"] = { "value" => i } }
raise "id collision in ordered map" if omap.to_yaml =~ /id\d+/
end
+
+ def test_normal_exit
+ YAML.load("2000-01-01 00:00:00.#{"0"*1000} +00:00\n")
+ # '[ruby-core:13735]'
+ end
end
if $0 == __FILE__