• Joe Tsai's avatar
    archive/tar: expand abilities of TestReader · cfb116d4
    Joe Tsai authored
    Motivation:
    * There are an increasing number of "one-off" corrupt files added
    to make sure that package does not succeed or crash on them.
    Instead, allow for the test to specify the error that is expected
    to occur (if any).
    * Also, fold in the logic to check the MD5 checksum into this
    function.
    
    The following tests are being removed:
    * TestIncrementalRead: Done by TestReader by using io.CopyBuffer
    with a buffer of 8. This achieves the same behavior as this test.
    * TestSparseEndToEnd: Since TestReader checks the MD5 checksums
    if the input corpus provides them, then this is redundant.
    * TestSparseIncrementalRead: Redundant for the same reasons that
    TestIncrementalRead is now redundant
    * TestNegativeHdrSize: Added to TestReader corpus
    * TestIssue10968: Added to TestReader corpus
    * TestIssue11169: Added to TestReader corpus
    
    With this change, code coverage did not change: 85.3%
    
    Change-Id: I8550d48657d4dbb8f47dfc3dc280758ef73b47ec
    Reviewed-on: https://go-review.googlesource.com/15176Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    cfb116d4
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...