Sun Nov 14 08:46:33 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>

* 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
This commit is contained in:
nahi 2004-11-13 23:50:46 +00:00
Родитель d51f21cee0
Коммит 12c788d061
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Sun Nov 14 08:46:33 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* test/logger/test_logger.rb: Logger just expects
Logger#datetime_format to be used for Time#strftime independently of
locale. [ruby-dev:24828]
Fri Nov 12 17:32:07 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* bcc32/README.bcc32, win32/README.win32: need bison instead of

Просмотреть файл

@ -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)