mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
split: fixing tests for parse_size_max()
This commit is contained in:
parent
2a0b4f8837
commit
a0a9ee6491
1 changed files with 12 additions and 8 deletions
|
@ -608,14 +608,6 @@ fn test_split_invalid_bytes_size() {
|
|||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_only("split: invalid number of bytes: '1024R'\n");
|
||||
#[cfg(not(target_pointer_width = "128"))]
|
||||
new_ucmd!()
|
||||
.args(&["-b", "1Y"])
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_only(
|
||||
"split: invalid number of bytes: '1Y': Value too large for defined data type\n",
|
||||
);
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
{
|
||||
let sizes = ["1000G", "10T"];
|
||||
|
@ -625,6 +617,18 @@ fn test_split_invalid_bytes_size() {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_split_overflow_bytes_size() {
|
||||
#[cfg(not(target_pointer_width = "128"))]
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let name = "test_split_overflow_bytes_size";
|
||||
RandomFile::new(&at, name).add_bytes(1000);
|
||||
ucmd.args(&["-b", "1Y", name]).succeeds();
|
||||
let glob = Glob::new(&at, ".", r"x[[:alpha:]][[:alpha:]]$");
|
||||
assert_eq!(glob.count(), 1);
|
||||
assert_eq!(glob.collate(), at.read_bytes(name));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_split_chunks_num_chunks_oversized_32() {
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue