File: decompressor_test.rb

package info (click to toggle)
ruby-zip 3.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,120 kB
  • sloc: ruby: 9,958; makefile: 23
file content (18 lines) | stat: -rw-r--r-- 501 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require_relative 'test_helper'

class DecompressorTest < Minitest::Test
  TEST_COMPRESSION_METHOD = 255

  class TestCompressionClass
  end

  def test_decompressor_registration
    assert_nil(::Zip::Decompressor.find_by_compression_method(TEST_COMPRESSION_METHOD))

    ::Zip::Decompressor.register(TEST_COMPRESSION_METHOD, TestCompressionClass)

    assert_equal(TestCompressionClass, ::Zip::Decompressor.find_by_compression_method(TEST_COMPRESSION_METHOD))
  end
end