rm: add the --progress option like with cp & mv#8567
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.
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.
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"); |
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.