test(portable): fix native stack and process-fixture assumptions
CI / fmt + clippy + test (Linux x86_64) (push) Waiting to run
CI / runtime contract (macos-latest) (push) Waiting to run
CI / runtime contract (windows-latest) (push) Waiting to run
Linux strict security lane (G-C) / strict isolation escape matrix (push) Waiting to run
CI / schema instance validation + consumers (push) Waiting to run
ci/woodpecker/push/woodpecker Pipeline was successful

macOS arm64 aborted in nesting_depth_limit_is_enforced because the test-harness
thread stack is smaller than a production main thread. Run that contract test
on an explicit 8 MiB stack; the 128-level parser bound itself is unchanged.

The stdlib process product test hard-coded /bin/echo, which does not exist on
Windows. Use the test CLI itself as the granted program: the fixture reads
MARQDO_TEST_PROCESS_PROGRAM from the granted env, runs it with --version, and
the harness compares against the same invocation. process.run now forwards
SYSTEMROOT/WINDIR on Windows (process creation/DLL loading, not a capability),
and the bundled stdlib digest is regenerated for the changed test fixture.
This commit is contained in:
cflmy committed 2026-11-21 18:35:33 +08:00
1 parent 3a29fce061
commit b898c419fe
5 files changed
+102 -39

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "marqdo-stdlib",
"version": "0.1.0",
"digest": "sha256:c3fca0cc3bd8f89f0f45d52418113613dd0613711cfdba76b514e5e6244409d2"
"digest": "sha256:b94f1a48ca6619689584aca3af7befac64ac9fdb7ea7c0a9ccb491df8df226b8"
}
+4 -1
View File
@@ -1,5 +1,6 @@
---
import:
env: "std:env"
process: "std:process"
---
@@ -7,6 +8,8 @@ import:
## main
**结果 = process.运行("/bin/echo", ["hello"])**
**程序 = env.读取("MARQDO_TEST_PROCESS_PROGRAM")**
**结果 = process.运行(程序.value, ["--version"])**
`return [结果.ok, 结果.value.status, 结果.value.stdout, 结果.value.stderr]`