diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2021-04-04 22:44:23 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2021-04-04 22:44:23 +0000 |
commit | b98aa3aaaee29f86518cf3b70f3611bdc346ea17 (patch) | |
tree | 7377405abd520a3c8c781e42c573e98e2bfbf2d3 /test/ruby | |
parent | febd8c91f63d53b38c3998567a45e3fc28c6bc58 (diff) |
merge revision(s) 2f1895fa: [Backport #16767]
Fixed formatted substring expansion [Bug #16767]
---
strftime.c | 2 ++
test/ruby/test_time.rb | 7 +++++++
2 files changed, 9 insertions(+)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_time.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 2bd4bc8455..6a55af139f 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -851,6 +851,13 @@ class TestTime < Test::Unit::TestCase assert_equal(8192, Time.now.strftime('%8192z').size) end + def test_strftime_wide_precision + t2000 = get_t2000 + s = t2000.strftime("%28c") + assert_equal(28, s.size) + assert_equal(t2000.strftime("%c"), s.strip) + end + def test_strfimte_zoneoffset t2000 = get_t2000 t = t2000.getlocal("+09:00:00") |