1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

shred: correctly print zero-byte pass in verbose mode (#7800)

Fixes #7798.

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
This commit is contained in:
Ben Wiederhake 2025-04-21 11:06:06 +02:00 committed by GitHub
parent b5e0e2342b
commit d7d0f9da7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View file

@ -209,6 +209,17 @@ fn test_shred_fail_no_perm() {
.stderr_contains("Couldn't rename to");
}
#[test]
fn test_shred_verbose_pass_single_0_byte_name() {
let (at, mut ucmd) = at_and_ucmd!();
let file = "foo";
at.write(file, "non-empty");
ucmd.arg("-vn200")
.arg(file)
.succeeds()
.stderr_contains("/200 (000000)...\n");
}
#[test]
fn test_shred_verbose_no_padding_1() {
let (at, mut ucmd) = at_and_ucmd!();