mirror of
https://github.com/vbatts/tar-split.git
synced 2024-12-18 11:36:30 +00:00
*.go: gomft -s -w
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
da105eb683
commit
2b88967591
2 changed files with 16 additions and 15 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build ignore
|
||||||
// +build ignore
|
// +build ignore
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
|
@ -11,17 +11,17 @@ import (
|
||||||
|
|
||||||
func TestDuplicateFail(t *testing.T) {
|
func TestDuplicateFail(t *testing.T) {
|
||||||
e := []Entry{
|
e := []Entry{
|
||||||
Entry{
|
{
|
||||||
Type: FileType,
|
Type: FileType,
|
||||||
Name: "./hurr.txt",
|
Name: "./hurr.txt",
|
||||||
Payload: []byte("abcde"),
|
Payload: []byte("abcde"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: FileType,
|
Type: FileType,
|
||||||
Name: "./hurr.txt",
|
Name: "./hurr.txt",
|
||||||
Payload: []byte("deadbeef"),
|
Payload: []byte("deadbeef"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: FileType,
|
Type: FileType,
|
||||||
Name: "hurr.txt", // slightly different path, same file though
|
Name: "hurr.txt", // slightly different path, same file though
|
||||||
Payload: []byte("deadbeef"),
|
Payload: []byte("deadbeef"),
|
||||||
|
@ -44,20 +44,20 @@ func TestDuplicateFail(t *testing.T) {
|
||||||
|
|
||||||
func TestJSONPackerUnpacker(t *testing.T) {
|
func TestJSONPackerUnpacker(t *testing.T) {
|
||||||
e := []Entry{
|
e := []Entry{
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("how"),
|
Payload: []byte("how"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("y'all"),
|
Payload: []byte("y'all"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: FileType,
|
Type: FileType,
|
||||||
Name: "./hurr.txt",
|
Name: "./hurr.txt",
|
||||||
Payload: []byte("deadbeef"),
|
Payload: []byte("deadbeef"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("doin"),
|
Payload: []byte("doin"),
|
||||||
},
|
},
|
||||||
|
@ -105,20 +105,20 @@ func TestJSONPackerUnpacker(t *testing.T) {
|
||||||
// bytes uncompressed vs 138 bytes compressed.
|
// bytes uncompressed vs 138 bytes compressed.
|
||||||
func TestGzip(t *testing.T) {
|
func TestGzip(t *testing.T) {
|
||||||
e := []Entry{
|
e := []Entry{
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("how"),
|
Payload: []byte("how"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("y'all"),
|
Payload: []byte("y'all"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: FileType,
|
Type: FileType,
|
||||||
Name: "./hurr.txt",
|
Name: "./hurr.txt",
|
||||||
Payload: []byte("deadbeef"),
|
Payload: []byte("deadbeef"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("doin"),
|
Payload: []byte("doin"),
|
||||||
},
|
},
|
||||||
|
@ -165,20 +165,20 @@ func TestGzip(t *testing.T) {
|
||||||
|
|
||||||
func BenchmarkGetPut(b *testing.B) {
|
func BenchmarkGetPut(b *testing.B) {
|
||||||
e := []Entry{
|
e := []Entry{
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("how"),
|
Payload: []byte("how"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("y'all"),
|
Payload: []byte("y'all"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: FileType,
|
Type: FileType,
|
||||||
Name: "./hurr.txt",
|
Name: "./hurr.txt",
|
||||||
Payload: []byte("deadbeef"),
|
Payload: []byte("deadbeef"),
|
||||||
},
|
},
|
||||||
Entry{
|
{
|
||||||
Type: SegmentType,
|
Type: SegmentType,
|
||||||
Payload: []byte("doin"),
|
Payload: []byte("doin"),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue