diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-22 22:28:53 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-22 22:28:53 +0000 |
commit | 6e9ca6484380cfe2d5ba25c3cd31133afe64105a (patch) | |
tree | e18f04b0793fea1e324fb0b4d6386bfab756cd5c /test | |
parent | ed5c01b9a3b40110956b4b57a9135288b4f9f52c (diff) | |
download | ruby-6e9ca6484380cfe2d5ba25c3cd31133afe64105a.tar.gz |
added some tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/date/test_date_base.rb | 1 | ||||
-rw-r--r-- | test/date/test_date_strftime.rb | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test/date/test_date_base.rb b/test/date/test_date_base.rb index a8dc2ee6b2..a266058413 100644 --- a/test/date/test_date_base.rb +++ b/test/date/test_date_base.rb @@ -314,6 +314,7 @@ class TestDateBase < Test::Unit::TestCase Date.__send__(valid_civil_p, 2001,1,-31)) assert_nil(Date.__send__(valid_civil_p, 2001,1,-32)) assert_equal(2452348, Date.__send__(valid_civil_p, 2002,3,14)) + assert_nil(Date.__send__(valid_civil_p, 2010,-13,-1)) end def test_valid_civil__edge diff --git a/test/date/test_date_strftime.rb b/test/date/test_date_strftime.rb index e4ab3550b3..890ad2ee5a 100644 --- a/test/date/test_date_strftime.rb +++ b/test/date/test_date_strftime.rb @@ -333,6 +333,7 @@ class TestDateStrftime < Test::Unit::TestCase assert_equal('2001-02-03', d.iso8601) assert_equal(d.xmlschema, d.iso8601) + assert_equal('2001-02-03T00:00:00+00:00', d.rfc3339) assert_equal('Sat, 3 Feb 2001 00:00:00 +0000', d.rfc2822) assert_equal(d.rfc822, d.rfc2822) assert_equal('Sat, 03 Feb 2001 00:00:00 GMT', d.httpdate) @@ -359,6 +360,8 @@ class TestDateStrftime < Test::Unit::TestCase assert_equal('2001-02-03T04:05:06.123456000+00:00', d2.rfc3339(9)) assert_equal('H13.02.03T04:05:06.123456000+00:00', d2.jisx0301(9)) + assert_equal('1800-01-01T00:00:00+00:00', DateTime.new(1800).jisx0301) + assert_equal('1868-01-25', Date.parse('1868-01-25').jisx0301) assert_equal('1872-12-31', Date.parse('1872-12-31').jisx0301) |