Enable Getwd() in wasi and add tests

This commit is contained in:
Federico G. Schwindt
2021-11-25 11:03:24 +00:00
committed by Ron Evans
parent 039186a2a3
commit 08d0dc0d25
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
// +build baremetal wasi wasm
// +build baremetal wasm
// This file emulates some file-related functions that are only available
// under a real operating system.
+1 -1
View File
@@ -1,4 +1,4 @@
// +build !baremetal,!wasi,!wasm
// +build !baremetal,!wasm
// This file assumes there is a libc available that runs on a real operating
// system.
+8
View File
@@ -34,4 +34,12 @@ func main() {
}
os.Stdout.Write(data)
path, err := os.Getwd()
if err != nil {
panic(err)
}
if path == "" {
panic("path is empty")
}
}