зеркало из https://github.com/github/ruby.git
* test/ruby/test_time.rb (test_readers): fix typo.
(test_strftime): "UTC" is also ok for time.gmtime.strftime("%Z"). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
50a860d006
Коммит
2f866a3666
|
@ -1,3 +1,8 @@
|
|||
Fri Feb 29 03:22:19 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_time.rb (test_readers): fix typo.
|
||||
(test_strftime): "UTC" is also ok for time.gmtime.strftime("%Z").
|
||||
|
||||
Fri Feb 29 02:50:07 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* string.c (str_new): remove encoding assumption of empty string.
|
||||
|
|
|
@ -327,6 +327,7 @@ class TestTime < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_strftime
|
||||
t = Time.at(946684800).getlocal
|
||||
assert_equal("Sat", T2000.strftime("%a"))
|
||||
assert_equal("Saturday", T2000.strftime("%A"))
|
||||
assert_equal("Jan", T2000.strftime("%b"))
|
||||
|
@ -347,7 +348,7 @@ class TestTime < Test::Unit::TestCase
|
|||
assert_equal("00:00:00", T2000.strftime("%X"))
|
||||
assert_equal("00", T2000.strftime("%y"))
|
||||
assert_equal("2000", T2000.strftime("%Y"))
|
||||
assert_equal("GMT", T2000.strftime("%Z"))
|
||||
assert(["GMT", "UTC"].include?(T2000.strftime("%Z")))
|
||||
assert_equal("%", T2000.strftime("%%"))
|
||||
|
||||
assert_equal("", T2000.strftime(""))
|
||||
|
|
Загрузка…
Ссылка в новой задаче