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:
parent
2a333ab391
commit
0ce22f3a08
8 changed files with 67 additions and 5 deletions
|
@ -305,6 +305,16 @@ fn test_head_invalid_num() {
|
|||
new_ucmd!().args(&["-c", size]).succeeds();
|
||||
}
|
||||
}
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
{
|
||||
let sizes = ["-1000G", "-10T"];
|
||||
for size in &sizes {
|
||||
new_ucmd!()
|
||||
.args(&["-c", size])
|
||||
.fails()
|
||||
.stderr_is("head: out of range integral type conversion attempted: number of bytes is too large");
|
||||
}
|
||||
}
|
||||
new_ucmd!()
|
||||
.args(&["-c", "-³"])
|
||||
.fails()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue