diff --git a/tests/test_write_path_trigger.py b/tests/test_write_path_trigger.py index 0ecd9458..3d13cc8f 100644 --- a/tests/test_write_path_trigger.py +++ b/tests/test_write_path_trigger.py @@ -1020,8 +1020,9 @@ def test_hook_is_executable_and_shell_valid(): ]) def test_hook_reads_every_write_and_edit_payload_shape(tmp_path, tool, field): """Write and Edit name the payload differently, and the names have changed - across Claude Code versions: the code is sent whichever one is present.""" - code = "def debounce(fn):\n return fn\n" + across Claude Code versions: the code is sent whichever one is present. + (The shell drops a trailing newline, so the code here has none.)""" + code = "def debounce(fn):\n return fn" seen = _run_hook_against_sink(tmp_path, { "session_id": f"s-shape-{field}", "cwd": str(tmp_path), "tool_name": tool, "tool_input": {"file_path": str(tmp_path / "b.py"), field: code},