mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tests/dd: test supplying non-positive bs/ibs/cbs/obs
This commit is contained in:
committed by
Sylvestre Ledru
parent
4be5eb9f24
commit
e5a6b519ad
@@ -2107,3 +2107,17 @@ fn test_ascii_case_conversion_fallback() {
|
||||
.succeeds();
|
||||
assert_eq!(result.stdout(), input);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bs_not_positive() {
|
||||
for bs in [-5, 0, 0x0] {
|
||||
for bs_param in ["bs", "ibs", "obs", "cbs"] {
|
||||
new_ucmd!()
|
||||
.args(&[format!("{bs_param}={bs}")])
|
||||
.fails()
|
||||
.no_stdout()
|
||||
.code_is(1)
|
||||
.stderr_is(format!("dd: invalid number: ‘{bs}’\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user