fix(scripts): reject short flag closeout values · openclaw/openclaw@1b17517
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Verify Stable Main Closeout tests cover stable closeout CLI behavior. |
| 2 | +import { spawnSync } from "node:child_process"; |
| 3 | +import path from "node:path"; |
| 4 | +import { describe, expect, it } from "vitest"; |
| 5 | + |
| 6 | +function runCli(...args: string[]) { |
| 7 | +return spawnSync(process.execPath, ["scripts/verify-stable-main-closeout.mjs", ...args], { |
| 8 | +cwd: path.resolve("."), |
| 9 | +encoding: "utf8", |
| 10 | +}); |
| 11 | +} |
| 12 | + |
| 13 | +describe("verify-stable-main-closeout", () => { |
| 14 | +it("rejects option-shaped values before checking required arguments", () => { |
| 15 | +const result = runCli("--tag", "-h"); |
| 16 | + |
| 17 | +expect(result.status).toBe(1); |
| 18 | +expect(result.stdout).toBe(""); |
| 19 | +expect(result.stderr.trim()).toBe("--tag requires a value."); |
| 20 | +}); |
| 21 | +}); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。