* test/logger/test_logdevice.rb: fix tests to pass on windows
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7b2d47132f
commit
dd4f590196
@ -295,10 +295,12 @@ class TestLogDevice < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_shifting_period_suffix
|
def test_shifting_period_suffix
|
||||||
# shift_age other than 'daily', 'weekly', and 'monthly' means 'everytime'
|
# shift_age other than 'daily', 'weekly', and 'monthly' means 'everytime'
|
||||||
{
|
['%Y%m%d', '%Y-%m-%d', '%Y'].each do |format|
|
||||||
"%Y%m%d" => Logger.new(@filename, 'now', 1048576), # default
|
if format == '%Y%m%d' # default
|
||||||
"%Y-%m-%d" => Logger.new(@filename, 'now', 1048576, shift_period_suffix: '%Y-%m-%d')
|
logger = Logger.new(@filename, 'now', 1048576)
|
||||||
}.each do |format, logger|
|
else # config
|
||||||
|
logger = Logger.new(@filename, 'now', 1048576, shift_period_suffix: format)
|
||||||
|
end
|
||||||
begin
|
begin
|
||||||
yyyymmdd = Time.now.strftime(format)
|
yyyymmdd = Time.now.strftime(format)
|
||||||
filename1 = @filename + ".#{yyyymmdd}"
|
filename1 = @filename + ".#{yyyymmdd}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user