mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 15:33:40 +00:00
Enable Getwd() in wasi and add tests
This commit is contained in:
committed by
Ron Evans
parent
039186a2a3
commit
08d0dc0d25
@@ -1,4 +1,4 @@
|
|||||||
// +build baremetal wasi wasm
|
// +build baremetal wasm
|
||||||
|
|
||||||
// This file emulates some file-related functions that are only available
|
// This file emulates some file-related functions that are only available
|
||||||
// under a real operating system.
|
// under a real operating system.
|
||||||
|
|||||||
@@ -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
|
// This file assumes there is a libc available that runs on a real operating
|
||||||
// system.
|
// system.
|
||||||
|
|||||||
Vendored
+8
@@ -34,4 +34,12 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
os.Stdout.Write(data)
|
os.Stdout.Write(data)
|
||||||
|
|
||||||
|
path, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
if path == "" {
|
||||||
|
panic("path is empty")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user