diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-08 01:13:03 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-08 01:13:03 +0900 |
commit | 2f1895fa15386fb3cdc91c5604171290828b9da8 (patch) | |
tree | 464b3a898c0d2a395f7e07424ac12890bde0b888 /test/ruby/test_time.rb | |
parent | 1711258144cf7bb4ddeba4a17da70935d5eedb2b (diff) |
Fixed formatted substring expansion [Bug #16767]
Diffstat (limited to 'test/ruby/test_time.rb')
-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 785376f09c..247bc34de7 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -893,6 +893,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") |