diff --git a/src/os/is_wasi_no_test.go b/src/os/is_wasi_no_test.go new file mode 100644 index 00000000..6917ec97 --- /dev/null +++ b/src/os/is_wasi_no_test.go @@ -0,0 +1,6 @@ +//go:build !wasi +// +build !wasi + +package os_test + +const isWASI = false diff --git a/src/os/is_wasi_test.go b/src/os/is_wasi_test.go new file mode 100644 index 00000000..6041faca --- /dev/null +++ b/src/os/is_wasi_test.go @@ -0,0 +1,6 @@ +//go:build wasi +// +build wasi + +package os_test + +const isWASI = true diff --git a/src/os/os_anyos_test.go b/src/os/os_anyos_test.go index 185974e6..51e986fc 100644 --- a/src/os/os_anyos_test.go +++ b/src/os/os_anyos_test.go @@ -277,6 +277,10 @@ func TestDirFS(t *testing.T) { t.Log("TODO: implement Readdir for Windows") return } + if isWASI { + t.Log("TODO: allow foo/bar/. as synonym for path foo/bar on wasi?") + return + } if err := fstest.TestFS(DirFS("./testdata/dirfs"), "a", "b", "dir/x"); err != nil { t.Fatal(err) }