File: errors_test.rb

package info (click to toggle)
ruby-zip 1.1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 668 kB
  • sloc: ruby: 7,041; makefile: 11
file content (36 lines) | stat: -rw-r--r-- 838 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# encoding: utf-8
require 'test_helper'

class ErrorsTest < MiniTest::Unit::TestCase

  def test_rescue_legacy_zip_error
    raise ::Zip::Error
  rescue ::Zip::ZipError
  end

  def test_rescue_legacy_zip_entry_exists_error
    raise ::Zip::EntryExistsError
  rescue ::Zip::ZipEntryExistsError
  end

  def test_rescue_legacy_zip_destination_file_exists_error
    raise ::Zip::DestinationFileExistsError
  rescue ::Zip::ZipDestinationFileExistsError
  end

  def test_rescue_legacy_zip_compression_method_error
    raise ::Zip::CompressionMethodError
  rescue ::Zip::ZipCompressionMethodError
  end

  def test_rescue_legacy_zip_entry_name_error
    raise ::Zip::EntryNameError
  rescue ::Zip::ZipEntryNameError
  end

  def test_rescue_legacy_zip_internal_error
    raise ::Zip::InternalError
  rescue ::Zip::ZipInternalError
  end

end