feat(core,cli): harden install engine and extend skill lint and interview eval
- update only touches the recorded project root; project installs do not follow symlinks or junctions; repeated --force rotates .orig backups; uninstall never deletes outside the recorded root - run npm/npx without a shell on Windows and pin optional tool versions - skip the update check in CI and non-interactive output - lint: cross-document section pointers, preflight row ids, gate rule numbers, per-document size budgets, gate copy equality - eval: scenarios S19-S21, route and read-cost rejudging, interpretation card judging, temp-dir previews and table-form cards no longer fail
This commit is contained in:
parent
ee3bef2ce5
commit
9bcb45cbd3
122 changed files with 5836 additions and 831 deletions
|
|
@ -48,3 +48,38 @@ test("블록이 없는 문서를 제거해도 그대로다", () => {
|
|||
const doc = "# 문서\n";
|
||||
assert.equal(removeBlock(doc, M), doc);
|
||||
});
|
||||
|
||||
test("본문이 마커 문자열을 언급해도 줄 전체가 마커인 블록만 인식한다", () => {
|
||||
const doc =
|
||||
"# 규칙\n\ndesignpaca 는 `<!-- designpaca:start -->` 블록을 쓴다.\n\n## 내 규칙\n\n지우지 마라.\n";
|
||||
const once = upsertBlock(doc, M, "v1");
|
||||
assert.ok(once.includes("## 내 규칙"));
|
||||
const twice = upsertBlock(once, M, "v2");
|
||||
assert.ok(twice.includes("## 내 규칙") && twice.includes("지우지 마라."));
|
||||
assert.equal(extractBlock(twice, M), "v2");
|
||||
const removed = removeBlock(twice, M);
|
||||
assert.equal(removed, doc);
|
||||
});
|
||||
|
||||
test("start/end 줄이 여러 개거나 짝이 맞지 않으면 쓰지 않고 오류로 멈춘다", () => {
|
||||
const twoBlocks = upsertBlock("앞\n", M, "a") + "\n" + upsertBlock("", M, "b");
|
||||
assert.throws(() => upsertBlock(twoBlocks, M, "c"), /start 2개/);
|
||||
assert.throws(() => removeBlock(twoBlocks, M));
|
||||
assert.equal(extractBlock(twoBlocks, M), null);
|
||||
|
||||
const endOnly = "<!-- designpaca:end -->\n본문\n";
|
||||
assert.throws(() => upsertBlock(endOnly, M, "x"));
|
||||
const reversed = "<!-- designpaca:end -->\n<!-- designpaca:start -->\n";
|
||||
assert.throws(() => upsertBlock(reversed, M, "x"));
|
||||
});
|
||||
|
||||
test("제거는 블록 밖의 연속 빈 줄을 정규화하지 않는다", () => {
|
||||
const doc = "```\na\n\n\n\nb\n```\n";
|
||||
const out = removeBlock(upsertBlock(doc, M, "블록"), M);
|
||||
assert.equal(out, doc);
|
||||
});
|
||||
|
||||
test("문서 중간 블록을 빼면 블록 앞뒤 구분 빈 줄 하나만 걷힌다", () => {
|
||||
const doc = "A\n\n<!-- designpaca:start -->\nx\n<!-- designpaca:end -->\n\nB\n";
|
||||
assert.equal(removeBlock(doc, M), "A\n\nB\n");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue