Sha256: f483f98f27e88d62a778e28bbe87e67940d730271390ce39c6825fe493cec6ba

Contents?: true

Size: 1.28 KB

Versions: 40

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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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

40 entries across 40 versions & 1 rubygems

Version Path
rroonga-4.0.3-x86-mingw32 test/test-logger.rb
rroonga-4.0.3-x64-mingw32 test/test-logger.rb
rroonga-4.0.3 test/test-logger.rb
rroonga-4.0.2-x64-mingw32 test/test-logger.rb
rroonga-4.0.2-x86-mingw32 test/test-logger.rb
rroonga-4.0.2 test/test-logger.rb
rroonga-4.0.1-x86-mingw32 test/test-logger.rb
rroonga-4.0.1-x64-mingw32 test/test-logger.rb
rroonga-4.0.1 test/test-logger.rb
rroonga-4.0.0-x64-mingw32 test/test-logger.rb
rroonga-4.0.0-x86-mingw32 test/test-logger.rb
rroonga-4.0.0 test/test-logger.rb
rroonga-3.1.2-x64-mingw32 test/test-logger.rb
rroonga-3.1.2-x86-mingw32 test/test-logger.rb
rroonga-3.1.2 test/test-logger.rb
rroonga-3.1.1-x64-mingw32 test/test-logger.rb
rroonga-3.1.1-x86-mingw32 test/test-logger.rb
rroonga-3.1.1 test/test-logger.rb
rroonga-3.1.0-x64-mingw32 test/test-logger.rb
rroonga-3.1.0-x86-mingw32 test/test-logger.rb