OSDN Git Service

util/statistics.rb: Updated to investigate floodgate-600-10 games.
[shogi-server/shogi-server.git] / test / TC_logger.rb
index 89355bc..698a33d 100644 (file)
@@ -2,6 +2,7 @@ $:.unshift File.join(File.dirname(__FILE__), "..")
 $topdir = File.expand_path File.dirname(__FILE__)
 require 'test/unit'
 require 'shogi_server'
+require 'fileutils'
 
 class TestableLogger < ShogiServer::Logger
   def initialize(logdev, shift_age = 0, shift_size = 1048576)
@@ -73,8 +74,9 @@ class TestLogger < Test::Unit::TestCase
     @logger.info("test_shift_log_period")
     now =  Time.mktime(2010, 7, 25, 23, 59, 59)
     @logger.logdev.shift_log_period(now)
-    assert_equal [["/home/daigo/rubyprojects/shogi-server/test/TC_logger_test.log",
-        "/home/daigo/rubyprojects/shogi-server/test/2010/07/24/TC_logger_test.log"]], 
+    assert_equal [[File.join($topdir, "TC_logger_test.log"),
+                   File.join($topdir, "2010", "07", "24", "TC_logger_test.log")]],
         @logger.logdev.result_rename_file
   end
+
 end