feat(vendor): add playbook snapshot generation

This commit is contained in:
csh
2026-01-23 14:30:30 +08:00
parent 8cfcc25f98
commit 49bbfa13e4
2 changed files with 233 additions and 1 deletions
+18
View File
@@ -47,5 +47,23 @@ langs = ["tsl"]
self.assertIn("sync_standards", output)
self.assertIn("format_md", output)
def test_vendor_creates_snapshot(self):
with tempfile.TemporaryDirectory() as tmp_dir:
config_body = f"""
[playbook]
project_root = "{tmp_dir}"
[vendor]
langs = ["tsl"]
"""
config_path = Path(tmp_dir) / "playbook.toml"
config_path.write_text(config_body, encoding="utf-8")
result = run_cli("-config", str(config_path))
snapshot = Path(tmp_dir) / "docs/standards/playbook/SOURCE.md"
self.assertEqual(result.returncode, 0)
self.assertTrue(snapshot.is_file())
if __name__ == "__main__":
unittest.main()