mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
added some tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ed5c01b9a3
commit
6e9ca64843
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue