mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
dd: fail on missing number in count
This commit is contained in:
parent
ab5a3656bf
commit
bd336ebbf1
3 changed files with 18 additions and 1 deletions
|
@ -1537,6 +1537,16 @@ fn test_nocache_stdin_error() {
|
|||
.stderr_only(format!("dd: failed to discard cache for: 'standard input': {detail}\n0+0 records in\n0+0 records out\n"));
|
||||
}
|
||||
|
||||
/// Test that dd fails when no number in count.
|
||||
#[test]
|
||||
fn test_empty_count_number() {
|
||||
new_ucmd!()
|
||||
.args(&["count=B"])
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_only("dd: invalid number: ‘B’\n");
|
||||
}
|
||||
|
||||
/// Test for discarding system file cache.
|
||||
#[test]
|
||||
#[cfg(target_os = "linux")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue