♻️ refactor(tests): consolidate playbook CLI coverage

This commit is contained in:
csh
2026-06-01 14:22:57 +08:00
parent 02ad5e5f4a
commit 5d9673cf6e
11 changed files with 652 additions and 710 deletions
+17
View File
@@ -169,11 +169,28 @@ no_backup = true
snapshot_root = project_root / CUSTOM_DEPLOY_ROOT
self.assertTrue((snapshot_root / "SOURCE.md").is_file())
self.assertTrue((snapshot_root / "scripts" / "playbook.py").is_file())
self.assertTrue(
(snapshot_root / "templates" / "AGENTS.template.md").is_file()
)
self.assertTrue(
(snapshot_root / "templates" / "AGENT_RULES.template.md").is_file()
)
self.assertTrue((snapshot_root / "templates" / "README.md").is_file())
self.assertTrue((snapshot_root / "templates" / "memory-bank").is_dir())
self.assertTrue((snapshot_root / "templates" / "prompts").is_dir())
self.assertTrue((snapshot_root / "skills").is_dir())
self.assertFalse((snapshot_root / "codex").exists())
self.assert_core_project_files(project_root)
self.assert_docs_prefix(project_root, "custom/playbook/docs")
rules_text = (project_root / "AGENT_RULES.md").read_text(encoding="utf-8")
self.assertIn(
"`custom/playbook/` 是 Playbook 模板/供应商目录",
rules_text,
)
self.assertNotIn("{{PLAYBOOK_ROOT}}", rules_text)
text = claude_md.read_text(encoding="utf-8")
self.assertIn("Keep this.", text)
self.assertIn("@../AGENTS.md", text)