1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-17 03:02:28 +08:00

fix: fix bug of Zip

This commit is contained in:
dudaodong
2023-08-03 10:45:48 +08:00
parent c3e28a9fc0
commit 1390b7a964
3 changed files with 79 additions and 7 deletions

View File

@@ -241,6 +241,19 @@ func TestZipAppendEntry(t *testing.T) {
os.RemoveAll(unZipPath)
}
func TestZipFolder(t *testing.T) {
assert := internal.NewAssert(t, "TestZipFolder")
toZipFolder := "./tempdir/a/b"
zipFolder := "./tempdir/a/b.zip"
err := Zip(toZipFolder, zipFolder)
assert.IsNil(err)
assert.Equal(true, IsExist(zipFolder))
os.Remove(zipFolder)
}
func TestFileMode(t *testing.T) {
assert := internal.NewAssert(t, "TestFileMode")