mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
split: fixing tests for parse_size_max()
This commit is contained in:
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user