diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-13 23:50:46 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-13 23:50:46 +0000 |
commit | 12c788d061c6039fb0ae9512f50ee90bbeec5a80 (patch) | |
tree | 7484a74a9b3a88d7bd44a6d279d1cb4d65d9d0df /test/logger/test_logger.rb | |
parent | d51f21cee00312a4581623e6b5481174d333ba74 (diff) |
Sun Nov 14 08:46:33 2004 NAKAMURA, Hiroshi <[email protected]>
* test/logger/test_logger.rb: Logger just expects
Logger#datetime_format to be used for Time#strftime independently of
locale. [ruby-dev:24828]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/logger/test_logger.rb')
-rw-r--r-- | test/logger/test_logger.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/logger/test_logger.rb b/test/logger/test_logger.rb index ed1270cf39..c953a89d9c 100644 --- a/test/logger/test_logger.rb +++ b/test/logger/test_logger.rb @@ -90,9 +90,15 @@ class TestLogger < Test::Unit::TestCase logger = Logger.new(dummy) log = log_add(logger, INFO, "foo") assert_match(/^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d.\s*\d+ $/, log.datetime) - logger.datetime_format = "%d%b%Y@%H:%M:%S" + # [ruby-dev:24828] + #logger.datetime_format = "%d%b%Y@%H:%M:%S" + #log = log_add(logger, INFO, "foo") + #assert_match(/^\d\d\w\w\w\d\d\d\d@\d\d:\d\d:\d\d$/, log.datetime) + # + # don't run the next test at 23:59, or just run again if failed. + logger.datetime_format = "@%d%b%Y@" log = log_add(logger, INFO, "foo") - assert_match(/^\d\d\w\w\w\d\d\d\d@\d\d:\d\d:\d\d$/, log.datetime) + assert_equal(Time.now.strftime("@%d%b%Y@"), log.datetime) logger.datetime_format = "" log = log_add(logger, INFO, "foo") assert_match(/^$/, log.datetime) |