fix(qa): reject missing memory fd args · openclaw/openclaw@928607a
vincentkoc
·
2026-06-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -112,6 +112,23 @@ describe("check-memory-fd-repro", () => {
|
112 | 112 | }); |
113 | 113 | }); |
114 | 114 | |
| 115 | +it("rejects missing valued options instead of consuming the next flag", () => { |
| 116 | +for (const flag of [ |
| 117 | +"--files", |
| 118 | +"--invoke-timeout-ms", |
| 119 | +"--max-workspace-reg-fds", |
| 120 | +"--min-leaked-fds", |
| 121 | +"--mode", |
| 122 | +"--output-dir", |
| 123 | +"--sample-delay-ms", |
| 124 | +"--settle-delay-ms", |
| 125 | +]) { |
| 126 | +for (const value of ["--keep", "-h"]) { |
| 127 | +expect(() => parseArgs([flag, value])).toThrow(`Missing value for ${flag}`); |
| 128 | +} |
| 129 | +} |
| 130 | +}); |
| 131 | + |
115 | 132 | it("stops parsing options after the argument terminator", () => { |
116 | 133 | expect(parseArgs(["--files", "20", "--", "--files", "99"])).toMatchObject({ |
117 | 134 | fileCount: 20, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。