aboutsummaryrefslogtreecommitdiff
path: root/lib/memfs/memfs_test.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2021-01-08 19:59:26 +0700
committerShulhan <m.shulhan@gmail.com>2021-01-08 19:59:26 +0700
commite16cf97cbe7394e39355055adbb8e1e2ad957692 (patch)
treece95f2cbf7594dc1478c9cbfe4e803129b80b376 /lib/memfs/memfs_test.go
parent27ff5bc5b3ea87d8795996eba10d20678c61c0f2 (diff)
downloadpakakeh.go-e16cf97cbe7394e39355055adbb8e1e2ad957692.tar.xz
memfs: remove field WithContent
The field WithContent is not necessary if we set MaxFileSize to negative value.
Diffstat (limited to 'lib/memfs/memfs_test.go')
-rw-r--r--lib/memfs/memfs_test.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/memfs/memfs_test.go b/lib/memfs/memfs_test.go
index e077e008..f40212c0 100644
--- a/lib/memfs/memfs_test.go
+++ b/lib/memfs/memfs_test.go
@@ -54,8 +54,7 @@ func TestAddFile(t *testing.T) {
}}
opts := &Options{
- Root: "testdata",
- WithContent: true,
+ Root: "testdata",
}
mfs, err := New(opts)
if err != nil {
@@ -161,7 +160,6 @@ func TestGet(t *testing.T) {
Root: dir,
// Limit file size to allow testing Get from disk on file "index.js".
MaxFileSize: 15,
- WithContent: true,
}
mfs, err := New(opts)
@@ -202,8 +200,7 @@ func TestMemFS_mount(t *testing.T) {
}, {
desc: "With file",
opts: Options{
- Root: afile,
- WithContent: true,
+ Root: afile,
},
expErr: fmt.Sprintf("memfs.New: mount: %q must be a directory", afile),
}, {
@@ -214,7 +211,6 @@ func TestMemFS_mount(t *testing.T) {
"memfs_generate.go$",
"direct$",
},
- WithContent: true,
},
expMapKeys: []string{
"/",
@@ -240,7 +236,6 @@ func TestMemFS_mount(t *testing.T) {
"memfs_generate.go$",
"direct$",
},
- WithContent: true,
},
expMapKeys: []string{
"/",
@@ -265,7 +260,6 @@ func TestMemFS_mount(t *testing.T) {
"memfs_generate.go$",
"direct$",
},
- WithContent: true,
},
expMapKeys: []string{
"/",
@@ -404,9 +398,8 @@ func TestFilter(t *testing.T) {
t.Log(c.desc)
opts := &Options{
- Includes: c.inc,
- Excludes: c.exc,
- WithContent: true,
+ Includes: c.inc,
+ Excludes: c.exc,
}
mfs, err := New(opts)
if err != nil {