mirror of
https://github.com/lune-org/lune.git
synced 2025-04-19 11:23:57 +01:00
chore(tests): add test case for stdin passing to child
This commit is contained in:
parent
64266f8e8b
commit
ad6b2a2364
1 changed files with 13 additions and 0 deletions
|
@ -138,3 +138,16 @@ assert(
|
|||
echoResult.stdout == (echoMessage .. "\n"), -- Note that echo adds a newline
|
||||
"Inheriting stdio did not return proper output"
|
||||
)
|
||||
|
||||
-- Passing stdin strings should work
|
||||
|
||||
local stdinChild = process.spawn("xargs", {
|
||||
"echo",
|
||||
}, {
|
||||
stdin = echoMessage,
|
||||
})
|
||||
|
||||
assert(
|
||||
stdinChild.stdout == (echoMessage .. "\n"), -- Note that echo adds a newline
|
||||
"Stdin passing did not return proper output"
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue