diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-03 10:56:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-03 10:56:36 +0000 |
commit | 1329c7cdca5cca07e8680a28724b3f192144f04e (patch) | |
tree | 369dbfb983f6e33adc669c8d02f0cb4a2f469ffb /test/date/test_date_parse.rb | |
parent | f0204a254789608edc46515f181b1f52ec106442 (diff) |
date: make zone a substring to copy encoding and taintedness
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/date/test_date_parse.rb')
-rw-r--r-- | test/date/test_date_parse.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/date/test_date_parse.rb b/test/date/test_date_parse.rb index c62554d126..7907295bf4 100644 --- a/test/date/test_date_parse.rb +++ b/test/date/test_date_parse.rb @@ -418,7 +418,14 @@ class TestDateParse < Test::Unit::TestCase a[1] = -1 a[2] = h[:yday] end - assert_equal(y, a, format('<failed at line %d>', l)) + l = format('<failed at line %d>', l) + assert_equal(y, a, l) + if y[6] + h = Date._parse(x[0].dup.taint, *x[1..-1]) + assert_equal(y[6], h[:zone], l) + assert_equal(y[6].encoding, h[:zone].encoding, l) + assert_predicate(h[:zone], :tainted?, l) + end end end |