mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
dd: remove spurious zero multiplier warning
Fix a bug in which `dd` was inappropriately showing a warning about a "0x" multiplier when there was no "x" character in the argument.
This commit is contained in:
parent
e1a611374a
commit
89f428b44f
2 changed files with 37 additions and 13 deletions
|
@ -201,6 +201,13 @@ fn test_x_multiplier() {
|
|||
#[test]
|
||||
fn test_zero_multiplier_warning() {
|
||||
for arg in ["count", "seek", "skip"] {
|
||||
new_ucmd!()
|
||||
.args(&[format!("{}=0", arg).as_str(), "status=none"])
|
||||
.pipe_in("")
|
||||
.succeeds()
|
||||
.no_stdout()
|
||||
.no_stderr();
|
||||
|
||||
new_ucmd!()
|
||||
.args(&[format!("{}=00x1", arg).as_str(), "status=none"])
|
||||
.pipe_in("")
|
||||
|
@ -1063,3 +1070,12 @@ fn test_all_valid_ascii_ebcdic_ascii_roundtrip_conv_test() {
|
|||
.succeeds()
|
||||
.stdout_is_fixture_bytes("all-valid-ascii-chars-37eff01866ba3f538421b30b7cbefcac.test");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_skip_zero() {
|
||||
new_ucmd!()
|
||||
.args(&["skip=0", "status=noxfer"])
|
||||
.succeeds()
|
||||
.no_stdout()
|
||||
.stderr_is("0+0 records in\n0+0 records out\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue