chore: initialize POM 2 repo (docs guards green; release gates recorded NOT RUN pending install)
This commit is contained in:
11
tests/command.test.ts
Normal file
11
tests/command.test.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { parseCommand } from "../src/parser";
|
||||
|
||||
test("command parser handles quotes, escapes, inline flags and terminator", () => {
|
||||
const parsed = parseCommand('new "The Clockwork Sea" --mode=strict-autopilot -- --literal \\ value');
|
||||
assert.equal(parsed.verb, "new");
|
||||
assert.deepEqual(parsed.args, ["The Clockwork Sea", "--literal", " value"]);
|
||||
assert.equal(parsed.flags.get("mode"), "strict-autopilot");
|
||||
assert.throws(() => parseCommand('new "unfinished'), /Unterminated quote/);
|
||||
});
|
||||
Reference in New Issue
Block a user