Repository navigation
Add end-to-end regression test that {.} keeps the ./ prefix for dash-prefixed names - #2246
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
atishay-kasliwal
left a comment
There was a problem hiding this comment.
This looks already fixed on master by #2243. I built current master and this branch, and on a tree with -rf.jpg, --delete.jpg and sub/-x.jpg, {.}, {}, {/}, {/.}, {//} and -X {.} give identical output on both ({.} is ./-rf on master too), so this may only need the extra test and a rebase. Separately, {/} still passes -rf.jpg without a ./ prefix on both.
tmccombs
left a comment
There was a problem hiding this comment.
This needs a rebase at the least. I'm also not sure there is much here worth adding since the issue has already been fixed in another PR.
…d names The fix for sharkdp#2236 landed in sharkdp#2243; this keeps the end-to-end CLI regression test from sharkdp#2246, rebased on current master.
4c36581 to
b948f35
Compare
{.} exec placeholder{.} keeps the ./ prefix for dash-prefixed names
|
@tmccombs Rebased on current master and reduced this to test-only, as you and @atishay-kasliwal suggested. The fix itself landed in #2243, and the unit cases from the original PR are already covered on master, so the only remaining change is the end-to-end CLI regression test for |
The fix for #2236 landed in #2243, so this PR is now test-only, as suggested in review.
It keeps the end-to-end CLI regression test: for a file named
-rf.jpg,fd --extension jpg --exec printf '[%s]\n' {.}must output[./-rf], i.e. the{.}placeholder keeps the./prefix so the name is not passed to the command as an option. The unit-level cases from the original PR turned out to already be covered on master, so they are dropped.Rebased on current master; the new test passes locally (
cargo test --test tests test_exec_no_extension_placeholder_keeps_dash_prefix).Refs #2236