Skip to content

Commit

Permalink
Merge pull request #28 from projectdiscovery/readerutil-test-cases
Browse files Browse the repository at this point in the history
remove lenreader & add unit tests
  • Loading branch information
Mzack9999 authored Dec 2, 2022
2 parents f852434 + 09e88f1 commit 471a54f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
15 changes: 0 additions & 15 deletions reader/length.go

This file was deleted.

4 changes: 4 additions & 0 deletions reader/reusable_read_closer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func TestReusableReader(t *testing.T) {
n, err := io.Copy(io.Discard, reusableReader)
require.Nil(t, err)
require.Positive(t, n)

bin, err := io.ReadAll(reusableReader)
require.Nil(t, err)
require.Len(t, bin, 4)
}
}
}

0 comments on commit 471a54f

Please sign in to comment.