diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-28 18:32:17 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-28 18:32:17 +0000 |
commit | 2f866a3666b3e768a07d4a780f7ff20375b82d21 (patch) | |
tree | 28e0694635df7678508714cdabbe75352f0d1928 | |
parent | 50a860d00635c6de5e32fe753b3adae596192f6d (diff) | |
download | ruby-2f866a3666b3e768a07d4a780f7ff20375b82d21.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_time.rb | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -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. diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 6c168fd39c..452e22f919 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -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("")) |