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

View File

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