aboutsummaryrefslogtreecommitdiff
path: root/lib/memfs/internal/test/embed_disable_modtime/memfs_embed_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-02 21:30:49 +0700
committerShulhan <ms@kilabit.info>2023-11-05 12:02:52 +0700
commit3dbed6f1d8e797af40d8fe4eefe5c30bf89ffce7 (patch)
tree3f0ab88c6b0d8be98a83ca39117584fdf9d9ec52 /lib/memfs/internal/test/embed_disable_modtime/memfs_embed_test.go
parentd714934c3b42d9fba7c8751532f92cb61c23e1e2 (diff)
downloadpakakeh.go-3dbed6f1d8e797af40d8fe4eefe5c30bf89ffce7.tar.xz
lib/memfs: include empty directory
Even thought empty directory does not contains file, from the parent node _it is_ part of their content. Also, there is a use case where memfs use as virtual file system (VFS), as a layer with file system, where user can view list of directory, create a directory or file on the fly. If we skip scanning empty directory, that directory will not be visible.
Diffstat (limited to 'lib/memfs/internal/test/embed_disable_modtime/memfs_embed_test.go')
-rw-r--r--lib/memfs/internal/test/embed_disable_modtime/memfs_embed_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/memfs/internal/test/embed_disable_modtime/memfs_embed_test.go b/lib/memfs/internal/test/embed_disable_modtime/memfs_embed_test.go
index 5cd447d4..a7a5d789 100644
--- a/lib/memfs/internal/test/embed_disable_modtime/memfs_embed_test.go
+++ b/lib/memfs/internal/test/embed_disable_modtime/memfs_embed_test.go
@@ -101,6 +101,7 @@ func TestNode_Readdir(t *testing.T) {
}, {
path: "/exclude",
exp: []string{
+ "dir",
"index-link.css",
"index-link.html",
"index-link.js",
@@ -108,6 +109,7 @@ func TestNode_Readdir(t *testing.T) {
}, {
path: "/include",
exp: []string{
+ "dir",
"index.css",
"index.html",
"index.js",