Sha256: 3c18540d629050ebd27e24a7a16901515713ec30c3bf4f281cc85d0e74fd6c76

Contents?: true

Size: 1.28 KB

Versions: 21

Compression:

Stored size: 1.28 KB

Contents

# Copyright (C) 2010  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

class LoggerTest < Test::Unit::TestCase
  include GroongaTestUtils

  def setup
    @default_log_path = Groonga::Logger.path
    @default_query_log_path = Groonga::QueryLogger.path
  end

  def teardown
    Groonga::Logger.path = @default_log_path
    Groonga::QueryLogger.path = @default_query_log_path
  end

  def test_reopen
    Groonga::Logger.unregister
    Groonga::Logger.path = @log_path.to_s
    if @log_path.exist?
      FileUtils.mv(@log_path, "#{@log_path}.old")
    end
    assert_false(@log_path.exist?)
    Groonga::Logger.reopen
    assert_true(@log_path.exist?)
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rroonga-5.0.1-x86-mingw32 test/test-logger.rb
rroonga-5.0.1-x64-mingw32 test/test-logger.rb
rroonga-5.0.1 test/test-logger.rb
rroonga-5.0.0-x64-mingw32 test/test-logger.rb
rroonga-5.0.0-x86-mingw32 test/test-logger.rb
rroonga-5.0.0 test/test-logger.rb
rroonga-4.0.8-x64-mingw32 test/test-logger.rb
rroonga-4.0.8-x86-mingw32 test/test-logger.rb
rroonga-4.0.8 test/test-logger.rb
rroonga-4.0.7-x64-mingw32 test/test-logger.rb
rroonga-4.0.7-x86-mingw32 test/test-logger.rb
rroonga-4.0.7 test/test-logger.rb
rroonga-4.0.6-x64-mingw32 test/test-logger.rb
rroonga-4.0.6-x86-mingw32 test/test-logger.rb
rroonga-4.0.6 test/test-logger.rb
rroonga-4.0.5-x64-mingw32 test/test-logger.rb
rroonga-4.0.5-x86-mingw32 test/test-logger.rb
rroonga-4.0.5 test/test-logger.rb
rroonga-4.0.4-x86-mingw32 test/test-logger.rb
rroonga-4.0.4-x64-mingw32 test/test-logger.rb