Files
wazero/internal/gojs/syscall_test.go
Takeshi Yoneda f24a3f49a4 gojs: refactors out gojs.Config type (#1240)
In order to support more configuration, we should stop using context as
it is getting gnarly.

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-03-15 12:27:47 +08:00

26 lines
517 B
Go

package gojs_test
import (
"testing"
"github.com/tetratelabs/wazero/internal/testing/require"
)
func Test_syscall(t *testing.T) {
t.Parallel()
stdout, stderr, err := compileAndRun(testCtx, "syscall", defaultConfig)
require.EqualError(t, err, `module "" closed with exit_code(0)`)
require.Zero(t, stderr)
require.Equal(t, `syscall.Getpid()=1
syscall.Getppid()=0
syscall.Getuid()=0
syscall.Getgid()=0
syscall.Geteuid()=0
syscall.Umask(0077)=0o22
syscall.Getgroups()=[0]
os.FindProcess(1).Pid=1
`, stdout)
}