mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/date/test_*.rb: added tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
14b57772ec
commit
c67712ef63
4 changed files with 25 additions and 0 deletions
|
|
@ -455,6 +455,12 @@ class TestDateStrptime < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_strptime__ex
|
||||
assert_raise(ArgumentError) do
|
||||
Date.strptime('')
|
||||
end
|
||||
assert_raise(ArgumentError) do
|
||||
DateTime.strptime('')
|
||||
end
|
||||
assert_raise(ArgumentError) do
|
||||
Date.strptime('2001-02-29', '%F')
|
||||
end
|
||||
|
|
@ -464,6 +470,9 @@ class TestDateStrptime < Test::Unit::TestCase
|
|||
assert_raise(ArgumentError) do
|
||||
Date.strptime('23:55', '%H:%M')
|
||||
end
|
||||
assert_raise(ArgumentError) do
|
||||
Date.strptime('01-31-2011', '%m/%d/%Y')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue