mirror of
https://github.com/lune-org/lune.git
synced 2025-04-10 21:40:54 +01:00
chore(tests): windows support for process.spawn stream test
This commit is contained in:
parent
d9cc71e512
commit
f0906c98a2
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,10 @@ assert(
|
||||||
"Failed to write to stdin or read from stdout of child process"
|
"Failed to write to stdin or read from stdout of child process"
|
||||||
)
|
)
|
||||||
|
|
||||||
local echoChild = process.spawn("echo", { msg, ">>/dev/stderr" }, { shell = true })
|
local echoChild = if process.os == "windows"
|
||||||
|
then process.spawn("Write-Error", { msg }, { shell = "powershell" })
|
||||||
|
else process.spawn("echo", { msg, ">>/dev/stderr" }, { shell = true })
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
msg == buffer.tostring(echoChild.stderr:read(#msg)),
|
msg == buffer.tostring(echoChild.stderr:read(#msg)),
|
||||||
"Failed to read from stderr of child process"
|
"Failed to read from stderr of child process"
|
||||||
|
|
Loading…
Add table
Reference in a new issue