-
refactor(grep): extract error-exit decision into pure unit-tested fn
发布于
2026-06-18 15:06:14 +00:00 Address KuSh review on #2465:
- Move the
exit_code >= 2decision into a pureis_grep_error_exit
function and unit-test it directly (0/1 = normal, >=2 = error),
instead of faking the rg binary in an integration test. - Drop the GREP_ERROR_EXIT const; the doc comment on the function
conveys the grep/rg exit convention. - Remove tests/grep_error_test.rs (faked binary) in favour of the
unit test.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
下载附件
- Move the