Commit 6a591a3e authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

trim zipfs test.

parent 7fe9eff8
......@@ -2,6 +2,7 @@ package zipfs
import (
"github.com/hanwen/go-fuse/fuse"
"io/ioutil"
"os"
"testing"
)
......@@ -28,17 +29,11 @@ func setupZipfs() (mountPoint string, cleanup func()) {
func TestZipFs(t *testing.T) {
mountPoint, clean := setupZipfs()
defer clean()
d, err := os.Open(mountPoint)
CheckSuccess(err)
names, err := d.Readdirnames(-1)
CheckSuccess(err)
err = d.Close()
entries, err := ioutil.ReadDir(mountPoint)
CheckSuccess(err)
if len(names) != 2 {
t.Error("wrong length", names)
if len(entries) != 2 {
t.Error("wrong length", entries)
}
fi, err := os.Stat(mountPoint + "/subdir")
CheckSuccess(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment