From 270a2f51fdc907bee0c9ae11f7be1675b6b69f04 Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Sun, 1 May 2022 20:26:14 -0700 Subject: [PATCH] os: skip TestDirFS on wasi until #2827 is fixed --- src/os/is_wasi_no_test.go | 6 ++++++ src/os/is_wasi_test.go | 6 ++++++ src/os/os_anyos_test.go | 4 ++++ 3 files changed, 16 insertions(+) create mode 100644 src/os/is_wasi_no_test.go create mode 100644 src/os/is_wasi_test.go 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) }