@@ -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):
|
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
|
"""Write and Edit name the payload differently, and the names have changed
|
||||||
across Claude Code versions: the code is sent whichever one is present."""
|
across Claude Code versions: the code is sent whichever one is present.
|
||||||
code = "def debounce(fn):\n return fn\n"
|
(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, {
|
seen = _run_hook_against_sink(tmp_path, {
|
||||||
"session_id": f"s-shape-{field}", "cwd": str(tmp_path), "tool_name": tool,
|
"session_id": f"s-shape-{field}", "cwd": str(tmp_path), "tool_name": tool,
|
||||||
"tool_input": {"file_path": str(tmp_path / "b.py"), field: code},
|
"tool_input": {"file_path": str(tmp_path / "b.py"), field: code},
|
||||||
|
|||||||
Reference in New Issue
Block a user