8000 Add tests for bzip2 errors · rubyzip/rubyzip@39eec09 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39eec09

Browse files
committed
Add tests for bzip2 errors
1 parent ae82a90 commit 39eec09

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

test/bzip2_errors_test.rb

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# encoding: utf-8
2+
3+
require 'test_helper'
4+
5+
class Bzip2ErrorsTest < MiniTest::Test
6+
def test_bzip2_error
7+
raise ::Zip::Bzip2::Error
8+
rescue ::Zip::Bzip2::Error
9+
end
10+
11+
def test_bzip2_mem_error
12+
raise ::Zip::Bzip2::MemError
13+
rescue ::Zip::Bzip2::Error
14+
end
15+
16+
def test_bzip2_data_error
17+
raise ::Zip::Bzip2::DataError
18+
rescue ::Zip::Bzip2::Error
19+
end
20+
21+
def test_bzip2_magic_data_error
22+
raise ::Zip::Bzip2::MagicDataError
23+
rescue ::Zip::Bzip2::Error
24+
end
25+
26+
def test_bzip2_config_error
27+
raise ::Zip::Bzip2::ConfigError
28+
rescue ::Zip::Bzip2::Error
29+
end
30+
31+
def test_bzip2_unexpected_error
32+
raise ::Zip::Bzip2::UnexpectedError, -999
33+
rescue ::Zip::Bzip2::Error
34+
end
35+
end

0 commit comments

Comments
 (0)
0