This commit is contained in:
codeskyblue
2019-02-15 17:41:35 +08:00
parent a16f689e99
commit 1bbc103672

View File

@@ -2,18 +2,19 @@ package main
import (
"bytes"
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestExtractFromZip(t *testing.T) {
buf := bytes.NewBuffer(nil)
err := ExtractFromZip("testdata/test.zip", "**/foo.txt", buf)
assert.NotNil(t, err)
assert.Nil(t, err)
t.Log("Content: " + buf.String())
}
//func TestUnzipTo(t *testing.T){
// err := unzipFile("testdata.zip", "./tmp")
// assert.Nil(t, err)
//}
//}