* 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
|
||||
# shift_age other than 'daily', 'weekly', and 'monthly' means 'everytime'
|
||||
{
|
||||
"%Y%m%d" => Logger.new(@filename, 'now', 1048576), # default
|
||||
"%Y-%m-%d" => Logger.new(@filename, 'now', 1048576, shift_period_suffix: '%Y-%m-%d')
|
||||
}.each do |format, logger|
|
||||
['%Y%m%d', '%Y-%m-%d', '%Y'].each do |format|
|
||||
if format == '%Y%m%d' # default
|
||||
logger = Logger.new(@filename, 'now', 1048576)
|
||||
else # config
|
||||
logger = Logger.new(@filename, 'now', 1048576, shift_period_suffix: format)
|
||||
end
|
||||
begin
|
||||
yyyymmdd = Time.now.strftime(format)
|
||||
filename1 = @filename + ".#{yyyymmdd}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user