1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Improve coverage / error messages from parse_size PR

https://github.com/uutils/coreutils/pull/3084 (2a333ab391) had some
missing coverage and was merged before I had a chance to fix it.

This PR adds some coverage / improved error messages that were missing
from that previous PR.
This commit is contained in:
Omer Tuchfeld 2022-02-22 20:58:41 +01:00
parent 2a333ab391
commit 0ce22f3a08
8 changed files with 67 additions and 5 deletions

View file

@ -460,6 +460,20 @@ fn test_zeros_to_stdout() {
.success();
}
#[cfg(target_pointer_width = "32")]
#[test]
fn test_oversized_bs_32_bit() {
for bs_param in &["bs", "ibs", "obs", "cbs"] {
new_ucmd!()
.args(&[format!("{}=5GB", bs_param)])
.run()
.no_stdout()
.failure()
.status_code(1)
.stderr_is(format!("dd: {}=N cannot fit into memory\n", bs_param));
}
}
#[test]
fn test_to_stdout_with_ibs_obs() {
let output: Vec<_> = String::from("y\n").bytes().cycle().take(1024).collect();