core/tools: rename grep_files to regex_files (regex pattern)

This commit is contained in:
2026-09-22 23:22:13 +08:00
parent 76933b044c
commit de03e5932b
11 changed files with 35 additions and 35 deletions
+2 -2
View File
@@ -352,13 +352,13 @@ async def test_pretty_glob_truncated(capsys: pytest.CaptureFixture[str]) -> None
async def test_pretty_grep(capsys: pytest.CaptureFixture[str]) -> None:
result = "src/a.py:3: x = 1\nsrc/a.py:9: x = 2\nsrc/b.py:1: y = 3\n"
await render_events(_aiter([_pretty_call("grep_files", '{"pattern": "x"}'), _result(result)]))
await render_events(_aiter([_pretty_call("regex_files", '{"pattern": "x"}'), _result(result)]))
out = capsys.readouterr().out
assert "* Grep 'x' in '.' (3 matches in 2 files)" in out
async def test_pretty_grep_no_matches(capsys: pytest.CaptureFixture[str]) -> None:
await render_events(_aiter([_pretty_call("grep_files", '{"pattern": "zzz"}'), _result("(no matches)")]))
await render_events(_aiter([_pretty_call("regex_files", '{"pattern": "zzz"}'), _result("(no matches)")]))
out = capsys.readouterr().out
assert "* Grep 'zzz' in '.' (no matches)" in out