summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-24 14:29:37 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-24 14:29:37 +0000
commit2bb558f184270515e5fc529b6b077182d8b91d0e (patch)
tree9271f92f39424b66c628fb95207def59835cbccd /test
parentf1d6603cb36a388fe373f847f9aed7ff46ab9305 (diff)
downloadruby-2bb558f184270515e5fc529b6b077182d8b91d0e.tar.gz
ruby-2bb558f184270515e5fc529b6b077182d8b91d0e.tar.xz
ruby-2bb558f184270515e5fc529b6b077182d8b91d0e.zip
* 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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_time.rb7
1 files changed, 7 insertions, 0 deletions
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