diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-20 15:30:28 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-20 15:30:28 +0000 |
commit | 21669ba304aa932a2aa8b004ad59c0f3bb3435c1 (patch) | |
tree | 8d47e5678e829369032447754c2f4034192b2994 /test/ruby/test_time.rb | |
parent | 760fe7968bfd857ad3868caf01738eee252d9fc9 (diff) | |
download | ruby-21669ba304aa932a2aa8b004ad59c0f3bb3435c1.tar.gz ruby-21669ba304aa932a2aa8b004ad59c0f3bb3435c1.tar.xz ruby-21669ba304aa932a2aa8b004ad59c0f3bb3435c1.zip |
* strftime.c: new file.
* common.mk (COMMONOBJS): added strftime.$(OBJEXT).
* time.c (time_strftime): do not use strftime(3). supported
%L(millisecond) and %N(nanosecond).
* test/ruby/test_time.rb: added tests for %L and %N.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_time.rb')
-rw-r--r-- | test/ruby/test_time.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index fe62f6a5b..049693037 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -379,5 +379,9 @@ class TestTime < Test::Unit::TestCase assert_equal("foo" * 1000, T2000.strftime("foo" * 1000)) assert_equal("Sat", Time.at(946684800).strftime("%a")) + + t = Time.at(946684800, 123456.789) + assert_equal("123", t.strftime("%L")) + assert_equal("123456789", t.strftime("%N")) end end |