summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2023-01-17 11:21:00 +0900
committerNARUSE, Yui <naruse@airemix.jp>2023-01-17 11:21:00 +0900
commit89cd61890fe78e0491708f87a5df678b03fda8a3 (patch)
tree2152c0a7b73d0508db05496521f3a62537955ed6 /test
parent49cf0896a2934547c0764aadaec021fb37a2e96f (diff)
merge revision(s) 542e984d82fa25098eb15398d716d907acc52b93: [Backport #19292]
[Bug #19292] Re-initialize tm when wday or yday is not set --- test/ruby/test_time.rb | 3 ++- time.c | 31 ++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-)
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_time.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index 0977fea55f..8274dbbc83 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -54,7 +54,8 @@ class TestTime < Test::Unit::TestCase
assert_raise_with_message(ArgumentError, msg) { Time.new(2021, 1, "+09:99") }
assert_raise_with_message(ArgumentError, msg) { Time.new(2021, "+09:99") }
- assert_equal([0, 0, 0, 2, 1, 2000], Time.new(2000, 1, 1, 24, 0, 0, "-00:00").to_a[0, 6])
+ assert_equal([0, 0, 0, 1, 1, 2000, 6, 1, false, "UTC"], Time.new(2000, 1, 1, 0, 0, 0, "-00:00").to_a)
+ assert_equal([0, 0, 0, 2, 1, 2000, 0, 2, false, "UTC"], Time.new(2000, 1, 1, 24, 0, 0, "-00:00").to_a)
end
def test_new_from_string