summaryrefslogtreecommitdiffstats
path: root/test/date
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-24 16:26:00 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-24 16:26:00 +0000
commit65063bf2995938709b7c57f4fd9bc9542fbb0f23 (patch)
treeeed5f05bbbb24737dd500d93504cf3fc9c532689 /test/date
parentc65833e67ab539ca13107892ab65d2085afd04c1 (diff)
downloadruby-65063bf2995938709b7c57f4fd9bc9542fbb0f23.tar.gz
ruby-65063bf2995938709b7c57f4fd9bc9542fbb0f23.tar.xz
ruby-65063bf2995938709b7c57f4fd9bc9542fbb0f23.zip
* lib/date/format.rb (strftime): ignores '_' flag for %[LN].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/date')
-rw-r--r--test/date/test_date_strftime.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/date/test_date_strftime.rb b/test/date/test_date_strftime.rb
index 1a190f21c..4131af3aa 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'))