mirror of
https://github.com/hamburghammer/gohttpserver.git
synced 2024-12-22 22:47:41 +01:00
20 lines
380 B
Go
20 lines
380 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestExtractFromZip(t *testing.T) {
|
|
buf := bytes.NewBuffer(nil)
|
|
err := ExtractFromZip("testdata/test.zip", "**/foo.txt", buf)
|
|
assert.Nil(t, err)
|
|
t.Log("Content: " + buf.String())
|
|
}
|
|
|
|
//func TestUnzipTo(t *testing.T){
|
|
// err := unzipFile("testdata.zip", "./tmp")
|
|
// assert.Nil(t, err)
|
|
//}
|