diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-09 11:08:15 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-09 11:08:15 +0000 |
commit | 54cb63091d0fa0f4216b4a3b3312f1a062ecf26e (patch) | |
tree | 4fa56515919673bd94b89d43ef4f2928b73285f8 /test/ruby | |
parent | 0c215e34dfc51e0757322c8ef17d421c6dfb07e4 (diff) | |
download | ruby-54cb63091d0fa0f4216b4a3b3312f1a062ecf26e.tar.gz |
* test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
add test for r33685.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_file.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index ba9549fda5..5fc4d0e379 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -1,5 +1,6 @@ require 'test/unit' require 'tempfile' +require_relative 'envutil' require_relative 'ut_eof' class TestFile < Test::Unit::TestCase @@ -181,4 +182,16 @@ class TestFile < Test::Unit::TestCase } end + def test_utime_with_minus_time_segv + bug5596 = '[ruby-dev:44838]' + assert_in_out_err([], <<-EOS, [bug5596], []) + t = Time.at(-1) + begin + f = Tempfile.new + File.utime(t, t, f) + rescue + end + puts '#{bug5596}' + EOS + end end |