From 9441f3f97087a4325ee80911859d37da41fa5050 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 4 Jan 2021 00:07:10 +0900 Subject: Allow UTC offset without colons per ISO-8601 [Bug #17504] --- test/ruby/test_time.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index e5da0d6343..b264e7f73c 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -1223,6 +1223,12 @@ class TestTime < Test::Unit::TestCase assert_equal [00, 00, 9, 1, 1, 2000], t.getlocal("+09:00").to_a[0, 6] assert_equal [20, 29, 21, 31, 12, 1999], t.getlocal("-02:30:40").to_a[0, 6] assert_equal [35, 10, 9, 1, 1, 2000], t.getlocal("+09:10:35").to_a[0, 6] + assert_equal [00, 30, 21, 31, 12, 1999], t.getlocal("-0230").to_a[0, 6] + assert_equal [00, 00, 9, 1, 1, 2000], t.getlocal("+0900").to_a[0, 6] + assert_equal [20, 29, 21, 31, 12, 1999], t.getlocal("-023040").to_a[0, 6] + assert_equal [35, 10, 9, 1, 1, 2000], t.getlocal("+091035").to_a[0, 6] + assert_raise(ArgumentError) {t.getlocal("-02:3040")} + assert_raise(ArgumentError) {t.getlocal("+0910:35")} end def test_getlocal_nil -- cgit v1.2.3