diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-30 09:22:38 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-30 09:22:38 +0000 |
commit | 029392bc879f70e3820bf47ceceb7bf0c9082e69 (patch) | |
tree | 88f59aa45de5b09605f78ec68499652d21cc8c35 /test | |
parent | 2015069a204e8ba13709f94aed5e4341ea297728 (diff) |
merges r20347 from trunk into ruby_1_9_1.
* lib/date/format.rb (strftime): ignores '_' flag for %[LN].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/date/test_date_strftime.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/date/test_date_strftime.rb b/test/date/test_date_strftime.rb index 1a190f21cc..4131af3aab 100644 --- a/test/date/test_date_strftime.rb +++ b/test/date/test_date_strftime.rb @@ -299,6 +299,24 @@ class TestDateStrftime < Test::Unit::TestCase assert_equal('-2000', d.strftime('%05Y')) end + def test_strftime__gnuext_LN # coreutils + d = DateTime.parse('2008-11-25T00:11:22.0123456789') + assert_equal('012', d.strftime('%L')) + assert_equal('012', d.strftime('%0L')) + assert_equal('0', d.strftime('%1L')) + assert_equal('01', d.strftime('%2L')) + assert_equal('01234567890', d.strftime('%11L')) + assert_equal('01234567890', d.strftime('%011L')) + assert_equal('01234567890', d.strftime('%_11L')) + assert_equal('012345678', d.strftime('%N')) + assert_equal('012345678', d.strftime('%0N')) + assert_equal('0', d.strftime('%1N')) + assert_equal('01', d.strftime('%2N')) + assert_equal('01234567890', d.strftime('%11N')) + assert_equal('01234567890', d.strftime('%011N')) + assert_equal('01234567890', d.strftime('%_11N')) + end + def test_strftime__gnuext_z # coreutils d = DateTime.parse('2006-08-08T23:15:33+09:08:07') assert_equal('+0908', d.strftime('%z')) |