-
-
Couldn't load subscription status.
- Fork 1.6k
rm: add the --progress option like with cp & mv #8567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
GNU testsuite comparison: |
c159d96 to
b2ad543
Compare
|
GNU testsuite comparison: |
b2ad543 to
a423590
Compare
|
GNU testsuite comparison: |
a423590 to
30ccad6
Compare
|
GNU testsuite comparison: |
30ccad6 to
388bfe6
Compare
|
GNU testsuite comparison: |
tests/by-util/test_rm.rs
Outdated
| // Test that -g/--progress flag is accepted | ||
| ucmd.arg("-g").arg(file).succeeds(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a disconnect between the code and the comment. I would either adapt the code to test both -g and --progress or change/remove the comment.
tests/by-util/test_rm.rs
Outdated
| let (_, mut ucmd) = at_and_ucmd!(); | ||
| let nonexistent_file = "this_file_does_not_exist"; | ||
|
|
||
| // Test that progress bar is not shown when file doesn't exist | ||
| let result = ucmd.arg("--progress").arg(nonexistent_file).fails(); | ||
|
|
||
| // Should contain error message but no progress bar output | ||
| result | ||
| .stderr_contains("cannot remove") | ||
| .stderr_contains("No such file or directory"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use new_ucmd! and no result var.
| let (_, mut ucmd) = at_and_ucmd!(); | |
| let nonexistent_file = "this_file_does_not_exist"; | |
| // Test that progress bar is not shown when file doesn't exist | |
| let result = ucmd.arg("--progress").arg(nonexistent_file).fails(); | |
| // Should contain error message but no progress bar output | |
| result | |
| .stderr_contains("cannot remove") | |
| .stderr_contains("No such file or directory"); | |
| let nonexistent_file = "this_file_does_not_exist"; | |
| // Test that progress bar is not shown when file doesn't exist | |
| new_ucmd!() | |
| .arg("--progress") | |
| .arg(nonexistent_file) | |
| .fails() | |
| .stderr_contains("cannot remove") | |
| .stderr_contains("No such file or directory"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
388bfe6 to
3321c33
Compare
CodSpeed Performance ReportMerging #8567 will degrade performances by 3.83%Comparing Summary
Benchmarks breakdown
Footnotes
|
3321c33 to
8bf15fe
Compare
|
GNU testsuite comparison: |
No description provided.