Skip to content

Commit 6f89772

Browse files
committed
tests/dd: test supplying non-positive bs/ibs/cbs/obs
1 parent cbcc027 commit 6f89772

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/by-util/test_dd.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,3 +2100,16 @@ fn test_ascii_case_conversion_fallback() {
21002100
.succeeds();
21012101
assert_eq!(result.stdout(), input);
21022102
}
2103+
2104+
#[test]
2105+
fn test_bs_not_positive() {
2106+
for bs in [-5, 0] {
2107+
for bs_param in ["bs", "ibs", "obs", "cbs"] {
2108+
new_ucmd!()
2109+
.args(&[format!("{bs_param}={bs}")])
2110+
.fails()
2111+
.no_stdout()
2112+
.code_is(1);
2113+
}
2114+
}
2115+
}

0 commit comments

Comments
 (0)