This commit is contained in:
Liang Ding 2015-10-21 12:04:08 +08:00
parent 4deb98baaf
commit 02d4bbab34
1 changed files with 10 additions and 3 deletions

View File

@ -20,8 +20,8 @@ import (
"testing" "testing"
) )
var home, _ = OS.Home() var tempDir = os.TempDir()
var testDir = filepath.Join(home, "wide-test") var testDir = filepath.Join(tempDir, "wide-test")
var packageName = filepath.Join(testDir, "test_zip") var packageName = filepath.Join(testDir, "test_zip")
func TestCreate(t *testing.T) { func TestCreate(t *testing.T) {
@ -57,7 +57,14 @@ func TestUnzip(t *testing.T) {
} }
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
os.Mkdir(testDir, 0644) err := os.Mkdir(testDir, 0644)
if err != nil {
logger.Error(err)
os.Exit(-1)
}
logger.Info(testDir)
retCode := m.Run() retCode := m.Run()