1
0
Fork 0
forked from mirrors/tar-split
This commit is contained in:
Vincent Batts 2015-08-11 21:59:23 -04:00
parent e2a62d6b0d
commit 5c8d5cacba
13 changed files with 265 additions and 50 deletions

View file

@ -12,17 +12,17 @@ import (
func TestDuplicateFail(t *testing.T) {
e := []Entry{
Entry{
Type: FileType,
Type: FileCheckEntry,
Name: "./hurr.txt",
Payload: []byte("abcde"),
},
Entry{
Type: FileType,
Type: FileCheckEntry,
Name: "./hurr.txt",
Payload: []byte("deadbeef"),
},
Entry{
Type: FileType,
Type: FileCheckEntry,
Name: "hurr.txt", // slightly different path, same file though
Payload: []byte("deadbeef"),
},
@ -45,20 +45,20 @@ func TestDuplicateFail(t *testing.T) {
func TestJSONPackerUnpacker(t *testing.T) {
e := []Entry{
Entry{
Type: SegmentType,
Type: SegmentEntry,
Payload: []byte("how"),
},
Entry{
Type: SegmentType,
Type: SegmentEntry,
Payload: []byte("y'all"),
},
Entry{
Type: FileType,
Type: FileCheckEntry,
Name: "./hurr.txt",
Payload: []byte("deadbeef"),
},
Entry{
Type: SegmentType,
Type: SegmentEntry,
Payload: []byte("doin"),
},
}
@ -106,20 +106,20 @@ func TestJSONPackerUnpacker(t *testing.T) {
func TestGzip(t *testing.T) {
e := []Entry{
Entry{
Type: SegmentType,
Type: SegmentEntry,
Payload: []byte("how"),
},
Entry{
Type: SegmentType,
Type: SegmentEntry,
Payload: []byte("y'all"),
},
Entry{
Type: FileType,
Type: FileCheckEntry,
Name: "./hurr.txt",
Payload: []byte("deadbeef"),
},
Entry{
Type: SegmentType,
Type: SegmentEntry,
Payload: []byte("doin"),
},
}