Skip to content

Commit

Permalink
More tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 21, 2024
1 parent f9ed1be commit 79a1b20
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/protocol/http/body/stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@
expect(stream.readpartial(20)).to be == "World"
expect{stream.readpartial(20)}.to raise_exception(EOFError)
end

it "can read partial input with buffer" do
buffer = String.new
expect(stream.readpartial(20, buffer)).to be == "Hello"
expect(buffer).to be == "Hello"
expect(stream.readpartial(20, buffer)).to be == "World"
expect(buffer).to be == "World"
expect{stream.readpartial(20, buffer)}.to raise_exception(EOFError)
expect(buffer).to be == ""
end
end

with '#read_until' do
Expand Down

0 comments on commit 79a1b20

Please sign in to comment.