Test a clone that enables no plugin, the generated settings' layout, and a .jsonl beside a home's projects folder
CI / tests (pull_request) Successful in 4m49s
CI / tests (pull_request) Successful in 4m49s
This commit is contained in:
@@ -75,6 +75,20 @@ class Home(unittest.TestCase):
|
||||
["auth", "status"],
|
||||
])
|
||||
|
||||
def test_a_clone_that_enables_no_plugin_installs_none(self) -> None:
|
||||
(self.clone / "settings.json").write_text('{"tui": "fullscreen"}', encoding="utf-8")
|
||||
|
||||
self.assertIsNone(self.unready())
|
||||
|
||||
self.assertEqual(self.ran, [["auth", "status"]])
|
||||
|
||||
def test_the_generated_settings_are_written_for_a_person_to_read(self) -> None:
|
||||
(self.clone / "settings.json").write_text('{"tui": "fullscreen", "env": {"A": "1"}}', encoding="utf-8")
|
||||
|
||||
self.unready()
|
||||
|
||||
self.assertEqual((self.home / "settings.json").read_text(encoding="utf-8"), '{\n "env": {\n "A": "1"\n },\n "tui": "fullscreen"\n}\n')
|
||||
|
||||
def test_a_home_built_from_the_clones_commit_is_left_as_it_is(self) -> None:
|
||||
self.unready()
|
||||
(self.home / "settings.json").write_text('{"model": "opus", "tui": "inline"}', encoding="utf-8")
|
||||
|
||||
@@ -1670,6 +1670,11 @@ class TranscriptRead(unittest.TestCase):
|
||||
with self.subTest(path):
|
||||
self.assertEqual(self.breached("Read", {"file_path": path}), [])
|
||||
|
||||
def test_a_read_of_a_jsonl_file_beside_a_homes_projects_folder_passes(self):
|
||||
for path in ("/home/h/.claude/history.jsonl", "/home/h/.local/share/build-release/claude-home/history.jsonl"):
|
||||
with self.subTest(path):
|
||||
self.assertEqual(self.breached("Read", {"file_path": path}), [])
|
||||
|
||||
def test_a_jsonl_file_outside_the_projects_folder_passes(self):
|
||||
self.assertEqual(self.breached("Read", {"file_path": "/home/h/code/acme/cases.jsonl"}), [])
|
||||
self.assertEqual(self.breached("Read", {"file_path": "/home/h/.local/state/build-release/transcripts/x.jsonl"}), [])
|
||||
|
||||
Reference in New Issue
Block a user