From 2bb558f184270515e5fc529b6b077182d8b91d0e Mon Sep 17 00:00:00 2001 From: shugo Date: Mon, 24 Nov 2008 14:29:37 +0000 Subject: * strftime.c (rb_strftime): The # flag should work with %a, %A, %b, %B, and %h. [ruby-dev:37162] * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_time.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 2f37d5787..a1a5bfc7f 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -461,5 +461,12 @@ class TestTime < Test::Unit::TestCase assert_equal("\n", T2000.strftime("%1n")) assert_equal(" \n", T2000.strftime("%3n")) assert_equal("00\n", T2000.strftime("%03n")) + + # [ruby-dev:37162] + assert_equal("SAT", T2000.strftime("%#a")) + assert_equal("SATURDAY", T2000.strftime("%#A")) + assert_equal("JAN", T2000.strftime("%#b")) + assert_equal("JANUARY", T2000.strftime("%#B")) + assert_equal("JAN", T2000.strftime("%#h")) end end -- cgit