Merge branch 'next' into kimi-runtime-support
This commit is contained in:
@@ -84,6 +84,50 @@ describe('install-profiles: MINIMAL_SKILL_ALLOWLIST', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// ─── #834: --help profile skill counts must track PROFILES ───────────────────
|
||||
|
||||
describe('install: --help profile counts match PROFILES (#834)', () => {
|
||||
function helpText() {
|
||||
return execFileSync(process.execPath, [INSTALL_SCRIPT, '--help'], {
|
||||
encoding: 'utf8',
|
||||
env: installerEnv(),
|
||||
});
|
||||
}
|
||||
|
||||
test('core line advertises PROFILES.core.length main-loop skills', () => {
|
||||
const out = helpText();
|
||||
const m = out.match(/core\s+—\s+~?(\d+)\s+main-loop skills/);
|
||||
assert.ok(m, `--help must advertise a core profile skill count; got:\n${out}`);
|
||||
assert.strictEqual(
|
||||
Number(m[1]),
|
||||
PROFILES.core.length,
|
||||
`--help core count (${m[1]}) must equal PROFILES.core.length (${PROFILES.core.length})`,
|
||||
);
|
||||
});
|
||||
|
||||
test('standard line advertises PROFILES.standard.length skills', () => {
|
||||
const out = helpText();
|
||||
const m = out.match(/standard\s+—\s+~?(\d+)\s+skills/);
|
||||
assert.ok(m, `--help must advertise a standard profile skill count; got:\n${out}`);
|
||||
assert.strictEqual(
|
||||
Number(m[1]),
|
||||
PROFILES.standard.length,
|
||||
`--help standard count (${m[1]}) must equal PROFILES.standard.length (${PROFILES.standard.length})`,
|
||||
);
|
||||
});
|
||||
|
||||
test('full line does not hardcode a drift-prone skill count', () => {
|
||||
const out = helpText();
|
||||
const m = out.match(/full\s+—\s+([^\n]*?)\s+\(default\)/);
|
||||
assert.ok(m, `--help must advertise a full profile line; got:\n${out}`);
|
||||
assert.doesNotMatch(
|
||||
m[1],
|
||||
/\d/,
|
||||
`--help full line must not hardcode a numeric skill count (drifts); got: "${m[1]}"`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('install-profiles: isMinimalMode', () => {
|
||||
test('returns true only for "minimal"', () => {
|
||||
assert.strictEqual(isMinimalMode('minimal'), true);
|
||||
|
||||
Reference in New Issue
Block a user