Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cre4ture committed Apr 26, 2024
1 parent af9c63c commit 035b3eb
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,21 @@ fn test_ls_allocation_size() {
.stdout_matches(&Regex::new("[^ ] 2 [^ ]").unwrap());

#[cfg(not(target_os = "freebsd"))]
let (empty_file_size, zero_file_size_4k, zero_file_size_1k, zero_file_size_8k, zero_file_size_4m) =
match get_allocated_size_variant(&scene, &scene.fixtures.subdir) {
AllocatedSizeVariant::Android10Plus => (4, 4100, 1025, 8216, "8.2M"),
AllocatedSizeVariant::F2fs4100 => (0, 4100, 1025, 8200, "4.1M"),
AllocatedSizeVariant::Default4096 => (0, 4096, 1024, 8192, "4.0M"),
};
let (
empty_file_size,
zero_file_size_4k,
zero_file_size_1k,
zero_file_size_8k,
zero_file_size_4m,
) = match get_allocated_size_variant(&scene, &scene.fixtures.subdir) {
AllocatedSizeVariant::Android10Plus => (4, 4100, 1025, 8216, "8.2M"),
AllocatedSizeVariant::F2fs4100 => (0, 4100, 1025, 8200, "4.1M"),

Check warning on line 252 in tests/by-util/test_ls.rs

View check run for this annotation

Codecov / codecov/patch

tests/by-util/test_ls.rs#L251-L252

Added lines #L251 - L252 were not covered by tests
AllocatedSizeVariant::Default4096 => (0, 4096, 1024, 8192, "4.0M"),
};

#[cfg(not(target_os = "freebsd"))]
{
let total = zero_file_size_4k + 2*empty_file_size;
let total = zero_file_size_4k + 2 * empty_file_size;
scene
.ucmd()
.arg("-s1")
Expand Down Expand Up @@ -4125,12 +4130,11 @@ fn test_ls_cf_output_should_be_delimited_by_tab() {
fn test_posixly_correct_and_block_size_env_vars() {
let scene = TestScenario::new(util_name!());

let (total, total_posix) =
match get_allocated_size_variant(&scene, &scene.fixtures.subdir) {
AllocatedSizeVariant::Android10Plus => (8, 16),
AllocatedSizeVariant::F2fs4100 => (4, 8),
AllocatedSizeVariant::Default4096 => (4, 8),
};
let (total, total_posix) = match get_allocated_size_variant(&scene, &scene.fixtures.subdir) {
AllocatedSizeVariant::Android10Plus => (8, 16),
AllocatedSizeVariant::F2fs4100 => (4, 8),

Check warning on line 4135 in tests/by-util/test_ls.rs

View check run for this annotation

Codecov / codecov/patch

tests/by-util/test_ls.rs#L4134-L4135

Added lines #L4134 - L4135 were not covered by tests
AllocatedSizeVariant::Default4096 => (4, 8),
};

scene
.ccmd("dd")
Expand Down Expand Up @@ -4185,13 +4189,11 @@ fn test_posixly_correct_and_block_size_env_vars() {
fn test_posixly_correct_and_block_size_env_vars_with_k() {
let scene = TestScenario::new(util_name!());

let total =
match get_allocated_size_variant(&scene, &scene.fixtures.subdir) {
AllocatedSizeVariant::Android10Plus => 8,
AllocatedSizeVariant::F2fs4100 => 4,
AllocatedSizeVariant::Default4096 => 4,
};

let total = match get_allocated_size_variant(&scene, &scene.fixtures.subdir) {
AllocatedSizeVariant::Android10Plus => 8,
AllocatedSizeVariant::F2fs4100 => 4,

Check warning on line 4194 in tests/by-util/test_ls.rs

View check run for this annotation

Codecov / codecov/patch

tests/by-util/test_ls.rs#L4193-L4194

Added lines #L4193 - L4194 were not covered by tests
AllocatedSizeVariant::Default4096 => 4,
};

scene
.ccmd("dd")
Expand Down Expand Up @@ -4298,7 +4300,6 @@ fn test_ls_block_size_override() {
AllocatedSizeVariant::Default4096 => ("4.1k", 8, "4.0K"),
};


scene
.ccmd("dd")
.arg("if=/dev/zero")
Expand Down

0 comments on commit 035b3eb

Please sign in to comment.