1
0
Fork 0
forked from mirrors/tar-split
tar-split/archive/tar
Joe Tsai 4ad443d166 archive/tar: expand abilities of TestReader
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/15176
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-02-02 14:06:30 -05:00
..
testdata archive/tar: fix round-trip attributes 2015-08-21 00:15:22 -04:00
common.go archive/tar: move round-trip reading into common os file 2015-08-21 00:15:22 -04:00
example_test.go archive/tar: adding from go as of a9dddb53f 2015-02-11 14:08:03 +01:00
reader.go archive/tar: make Reader.Read errors persistent 2016-02-02 14:06:30 -05:00
reader_test.go archive/tar: expand abilities of TestReader 2016-02-02 14:06:30 -05:00
stat_atim.go archive/tar: adding from go as of a9dddb53f 2015-02-11 14:08:03 +01:00
stat_atimespec.go archive/tar: adding from go as of a9dddb53f 2015-02-11 14:08:03 +01:00
stat_unix.go archive/tar: don't treat multiple file system links as a tar hardlink 2015-08-21 00:15:22 -04:00
tar_test.go archive/tar: move round-trip reading into common os file 2015-08-21 00:15:22 -04:00
writer.go archive/tar: remove dead code with USTAR path splitting 2016-02-02 14:06:30 -05:00
writer_test.go archive/tar: remove dead code with USTAR path splitting 2016-02-02 14:06:30 -05:00