From 51231d84baff8a936e1155d2ee2eee3b4d9117ce Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Tue, 7 Jan 2025 03:07:39 +0100 Subject: wdye: clean up, add process.pid --- tools/wdye/test.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/wdye/test.lua') 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") -- cgit v1.2.3-70-g09d2