Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miyucy committed Jul 28, 2024
1 parent 8605fb1 commit c542532
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/brotli_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ def testdata2
assert_equal testdata, Brotli.inflate(testdata3)
end

test "works with File" do
f = File.open(File.expand_path(File.join("..", "vendor", "brotli", "tests", "testdata", "alice29.txt.compressed"), __dir__))
assert_equal testdata, Brotli.inflate(f)
end

test "raise error when pass insufficient data" do
assert_raise Brotli::Error do
Brotli.inflate(testdata2[0, 64])
Expand Down

0 comments on commit c542532

Please sign in to comment.