aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_time.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_time.rb')
-rw-r--r--test/test_time.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_time.rb b/test/test_time.rb
index 54c2166ec5..b3dd40060c 100644
--- a/test/test_time.rb
+++ b/test/test_time.rb
@@ -423,6 +423,11 @@ class TestTimeExtension < Test::Unit::TestCase # :nodoc:
assert_equal(false, Time.strptime('0', '%s').utc?)
end
+ def test_strptime_empty
+ assert_raise(ArgumentError) { Time.strptime('', '') }
+ assert_raise(ArgumentError) { Time.strptime('+09:00', '%z') }
+ end
+
def test_strptime_s_z
t = Time.strptime('0 +0100', '%s %z')
assert_equal(0, t.to_r)