aboutsummaryrefslogtreecommitdiff
path: root/tools/wdye/test.lua
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2025-01-07 03:07:39 +0100
committerPřemysl Eric Janouch <p@janouch.name>2025-01-07 03:16:37 +0100
commit51231d84baff8a936e1155d2ee2eee3b4d9117ce (patch)
treee15544474ccea573872dec3287b78c01d00f0e65 /tools/wdye/test.lua
parent6c47e384f512e5eab14180c6913323783a0def11 (diff)
downloadliberty-51231d84baff8a936e1155d2ee2eee3b4d9117ce.tar.gz
liberty-51231d84baff8a936e1155d2ee2eee3b4d9117ce.tar.xz
liberty-51231d84baff8a936e1155d2ee2eee3b4d9117ce.zip
wdye: clean up, add process.pid
Diffstat (limited to 'tools/wdye/test.lua')
-rw-r--r--tools/wdye/test.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/wdye/test.lua b/tools/wdye/test.lua
index c255c72..add8488 100644
--- a/tools/wdye/test.lua
+++ b/tools/wdye/test.lua
@@ -25,7 +25,9 @@ cat:send("Closing...\r"):send("\004")
local v = expect(cat:eof {true},
cat:default {.5, function (p) error "expected EOF, got a timeout" end})
+assert(cat.pid > 0, "process has no ID")
local s1, exit, signal = cat:wait ()
assert(s1 == 0 and exit == 0 and not signal, "unexpected exit status")
+assert(cat.pid < 0, "process still has an ID")
local s2 = cat:wait (true)
assert(s1 == s2, "exit status not remembered")