New tooling
Entry: scripts/run-bin.mjs Preload shim (must load first): scripts/run-bin-prelude.mjs Harness: scripts/lib/run-bin-harness.mjs Usage: node scripts/run-bin.mjs ls -la /bin node scripts/run-bin.mjs cat /etc/passwd node scripts/run-bin.mjs --cmd sed -n '1,5p' /home/user/note.txt node scripts/run-bin.mjs --json echo "hello" printf 'a\nb\n' | node scripts/run-bin.mjs cat npm run test:coreutils -- --suite basic npm run test:coreutils -- --build --watch -- echo test # rebuild + watch src/<cmd>.js (use `--buil
This commit is contained in:
+51
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"cases": [
|
||||
{
|
||||
"id": "echo-text",
|
||||
"argv": ["echo", "bare-os-run-bin"],
|
||||
"expect": {
|
||||
"exitCode": 0,
|
||||
"stdoutIncludes": "bare-os-run-bin"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "pwd-root",
|
||||
"argv": ["pwd"],
|
||||
"expect": {
|
||||
"exitCode": 0,
|
||||
"stdoutIncludes": "/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "true-exit",
|
||||
"argv": ["true"],
|
||||
"expect": {
|
||||
"exitCode": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "false-exit",
|
||||
"argv": ["false"],
|
||||
"expect": {
|
||||
"exitCode": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "cat-note",
|
||||
"argv": ["cat", "/home/user/note.txt"],
|
||||
"expect": {
|
||||
"exitCode": 0,
|
||||
"stdoutIncludes": "hello from fixture layout"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "grep-home",
|
||||
"argv": ["grep", "hello", "/home/user/note.txt"],
|
||||
"expect": {
|
||||
"exitCode": 0,
|
||||
"stdoutIncludes": "hello"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
optional overlay file for suites that set "fixture": "with-extra"
|
||||
Reference in New Issue
Block a user