From 409159d68dc6110b80f6668d1b32b429830c476a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 26 Jul 2025 23:59:58 +0200 Subject: [PATCH] adjust/add tests --- tests/scryer/cli/unix/process.md | 10 ++++++++++ tests/scryer/cli/windows/process.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/scryer/cli/unix/process.md b/tests/scryer/cli/unix/process.md index 8a1aef06..6bb174e4 100644 --- a/tests/scryer/cli/unix/process.md +++ b/tests/scryer/cli/unix/process.md @@ -2,3 +2,13 @@ $ scryer-prolog -f --no-add-history -g 'use_module(library(process)), process_create("false", [], [process(P)]), process_wait(P, exit(1)), halt' ``` + +```trycmd +$ scryer-prolog -f --no-add-history -g 'use_module(library(process)), use_module(library(format)), process_create("sh", [], [process(P), stdout(null), stdin(pipe(S))]), format(S, "exit 1~n", []), process_wait(P, exit(1)), halt' + +``` + +```trycmd +$ scryer-prolog -f --no-add-history -g 'use_module(library(process)), process_create("sh", ["-c", "sleep 5"], [process(P), stdout(null)]), process_kill(P), process_wait(P, killed(9)), halt' + +``` \ No newline at end of file diff --git a/tests/scryer/cli/windows/process.md b/tests/scryer/cli/windows/process.md index 2b3fdbf5..da27656b 100644 --- a/tests/scryer/cli/windows/process.md +++ b/tests/scryer/cli/windows/process.md @@ -4,6 +4,6 @@ $ scryer-prolog -f --no-add-history -g 'use_module(library(process)), process_cr ``` ```trycmd -$ scryer-prolog -f --no-add-history -g 'use_module(library(process)), use_module(library(format)), process_create("cmd", [], [process(P), stdout(null), stdin(pipe(S))]), format(S, "exit 1~n", []), process_wait(P, Status), halt' +$ scryer-prolog -f --no-add-history -g 'use_module(library(process)), use_module(library(format)), process_create("cmd", [], [process(P), stdout(null), stdin(pipe(S))]), format(S, "exit 1~n", []), process_wait(P, exit(1)), halt' ``` \ No newline at end of file -- 2.54.0