test: handle missing configure-ecc docs cleanly

This commit is contained in:
Affaan Mustafa
2026-04-30 02:42:46 -04:00
committed by Affaan Mustafa
parent 803abe52a5
commit d05855be5f
4 changed files with 14 additions and 8 deletions

View File

@@ -133,10 +133,10 @@ Options:
選択された各スキルについて、正しいソースルートからスキルディレクトリ全体をコピーします:
```bash
# ステップ 2a で選択したコアスキルは .agents/skills/ 配下にあります
# コアスキルは .agents/skills/ 配下にあります
cp -R "$ECC_ROOT/.agents/skills/<skill-name>" "$TARGET/skills/"
# ステップ 2b/2c で選択したニッチスキルは skills/ 配下にあります
# ニッチスキルは skills/ 配下にあります
cp -R "$ECC_ROOT/skills/<skill-name>" "$TARGET/skills/"
```

View File

@@ -202,10 +202,10 @@ mkdir -p $TARGET/skills $TARGET/rules
对于每个选定的技能,请从正确的源目录复制整个技能目录:
```bash
# 步骤 2a 选中的核心技能位于 .agents/skills/
# 核心技能位于 .agents/skills/
cp -R "$ECC_ROOT/.agents/skills/<skill-name>" "$TARGET/skills/"
# 步骤 2b/2c 选中的细分技能位于 skills/
# 细分技能位于 skills/
cp -R "$ECC_ROOT/skills/<skill-name>" "$TARGET/skills/"
```

View File

@@ -198,10 +198,10 @@ For each selected category, print the full list of skills below and ask the user
For each selected skill, copy the entire skill directory from the correct source root:
```bash
# Core skills selected from Step 2a live under .agents/skills/
# Core skills live under .agents/skills/
cp -R "$ECC_ROOT/.agents/skills/<skill-name>" "$TARGET/skills/"
# Niche skills selected from Step 2b/2c live under skills/
# Niche skills live under skills/
cp -R "$ECC_ROOT/skills/<skill-name>" "$TARGET/skills/"
```

View File

@@ -27,12 +27,16 @@ function test(name, fn) {
}
}
function readConfigureEccDoc(relativePath) {
return fs.readFileSync(path.join(repoRoot, relativePath), 'utf8');
}
console.log('\n=== Testing configure-ecc install path guidance ===\n');
for (const relativePath of configureEccDocs) {
const content = fs.readFileSync(path.join(repoRoot, relativePath), 'utf8');
test(`${relativePath} separates core and niche skill source roots`, () => {
const content = readConfigureEccDoc(relativePath);
assert.ok(
content.includes('$ECC_ROOT/.agents/skills/<skill-name>'),
'Expected configure-ecc to document the core skill source root'
@@ -44,6 +48,8 @@ for (const relativePath of configureEccDocs) {
});
test(`${relativePath} documents defensive copy form for trailing slash sources`, () => {
const content = readConfigureEccDoc(relativePath);
assert.ok(
content.includes('${src%/}'),
'Expected configure-ecc to strip trailing slash before copying'