Commit 5595035d authored by Elias Pipping's avatar Elias Pipping

Tests: Cover wait-process

parent 5f8d2af9
......@@ -413,6 +413,24 @@
(and (numberp pid) (plusp pid)))
(wait-process process-info)))
(new-test-suite "wait-process")
(define-test
"exit code after exit: synchronous (repeated)"
(let ((process-info (%run-program "./exiter.sh 12" :wait t)))
(handle-result "exit code matches?"
(equal 12 (wait-process process-info)))
(handle-result "exit code matches? (no. 2)"
(equal 12 (wait-process process-info)))))
(define-test
"exit code after exit: asynchronous (repeated)"
(let ((process-info (%run-program "./sleeper.sh 12 1" :wait nil)))
(handle-result "exit code matches?"
(equal 12 (wait-process process-info)))
(handle-result "exit code matches? (no. 2)"
(equal 12 (wait-process process-info)))))
(fresh-line)
(run-tests)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment