1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
test.skip()
first = ref(true)
thread.run.recurrent(
{
if
first()
then
begin
first := false
2.
end
else
begin
test.equal(
process.read(
"printf toto"
),
"toto"
)
p =
process.run(
"exit 2"
)
test.equal(p.status, "exit")
test.equal(p.status.code, 2)
p =
process.run(
timeout=0.5,
"sleep 1"
)
test.equal(p.status, "timeout")
test.equal(
process.quote.command(
stdin="bla",
stdout="blo",
stderr="blo",
"foo",
args=["gni", 'gno"gna']
),
"'foo' 'gni' 'gno\"gna' <'bla' >'blo' 2>&1"
)
test.pass()
(-1.)
end
end
}
)
output.dummy(blank())
|