get process_create working and add tests

This commit is contained in:
Bennet Bleßmann
2025-07-26 18:21:00 +02:00
committed by Bennet Bleßmann
parent 1120bcde29
commit dc08a4ab11
14 changed files with 223 additions and 91 deletions

View File

@@ -0,0 +1,4 @@
```trycmd
$ scryer-prolog -f --no-add-history -g 'use_module(library(process)), process_create("false", [], [process(P)]), process_wait(P, exit(1)), halt'
```

View File

@@ -0,0 +1,4 @@
```trycmd
$ scryer-prolog -f --no-add-history -g 'use_module(library(process)), process_create("cmd", ["/C", "exit", "1"], [process(P)]), process_wait(P, exit(1)), halt'
```

View File

@@ -19,9 +19,19 @@ mod src_tests;
ignore = "miri isolation, unsupported operation: can't call foreign function"
)]
fn cli_tests() {
trycmd::TestCases::new()
let cases = trycmd::TestCases::new();
cases
.default_bin_name("scryer-prolog")
.case("tests/scryer/cli/issues/*.toml")
.case("tests/scryer/cli/src_tests/*.toml")
.case("tests/scryer/cli/src_tests/*.md");
.case("tests/scryer/cli/src_tests/*.toml");
#[cfg(windows)]
{
cases.case("tests/scryer/cli/windows/*.md");
}
#[cfg(unix)]
{
cases.case("tests/scryer/cli/unix/*.md");
}
}