mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 11:36:16 +00:00
Merge pull request #4918 from shinhs0506/core-size
shred: add support for octal and hex size
This commit is contained in:
commit
160952a42c
6 changed files with 143 additions and 63 deletions
|
@ -189,6 +189,15 @@ fn test_no_such_file_or_directory() {
|
|||
.stderr_contains("cannot open 'no_such_file.toml' for reading: No such file or directory");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lines_leading_zeros() {
|
||||
new_ucmd!()
|
||||
.arg("--lines=010")
|
||||
.pipe_in("\n\n\n\n\n\n\n\n\n\n\n\n")
|
||||
.succeeds()
|
||||
.stdout_is("\n\n\n\n\n\n\n\n\n\n");
|
||||
}
|
||||
|
||||
/// Test that each non-existent files gets its own error message printed.
|
||||
#[test]
|
||||
fn test_multiple_nonexistent_files() {
|
||||
|
|
|
@ -51,3 +51,14 @@ fn test_shred_force() {
|
|||
// file_a was deleted.
|
||||
assert!(!at.file_exists(file));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hex() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
let file = "test_hex";
|
||||
|
||||
at.touch(file);
|
||||
|
||||
ucmd.arg("--size=0x10").arg(file).succeeds();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue