From 6c437dcbe6886771ee8ffc9d7352c1aa6198b3d6 Mon Sep 17 00:00:00 2001 From: Dorian Peron Date: Fri, 2 May 2025 16:55:10 +0200 Subject: [PATCH 1/2] tests: Use #[should_panic] instead of #[ignore] --- tests/by-util/test_expr.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/by-util/test_expr.rs b/tests/by-util/test_expr.rs index 5ac5c262dfc..ddff442272d 100644 --- a/tests/by-util/test_expr.rs +++ b/tests/by-util/test_expr.rs @@ -742,8 +742,8 @@ mod gnu_expr { .stdout_only("3\n"); } - #[ignore] #[test] + #[should_panic] fn test_bre11() { new_ucmd!() .args(&["a$b", ":", "a$b"]) @@ -791,8 +791,8 @@ mod gnu_expr { .stdout_only("\n"); } - #[ignore] #[test] + #[should_panic] fn test_bre17() { new_ucmd!() .args(&["{1}a", ":", "\\(\\{1\\}a\\)"]) @@ -800,8 +800,8 @@ mod gnu_expr { .stdout_only("{1}a\n"); } - #[ignore] #[test] + #[should_panic] fn test_bre18() { new_ucmd!() .args(&["X*", ":", "X\\(*\\)", ":", "^*"]) @@ -809,8 +809,8 @@ mod gnu_expr { .stdout_only("1\n"); } - #[ignore] #[test] + #[should_panic] fn test_bre19() { new_ucmd!() .args(&["{1}", ":", "\\{1\\}"]) @@ -1021,8 +1021,8 @@ mod gnu_expr { .stderr_contains("Invalid content of \\{\\}"); } - #[ignore] #[test] + #[should_panic] fn test_bre45() { new_ucmd!() .args(&["a", ":", "a\\{,2\\}"]) @@ -1030,8 +1030,8 @@ mod gnu_expr { .stdout_only("1\n"); } - #[ignore] #[test] + #[should_panic] fn test_bre46() { new_ucmd!() .args(&["a", ":", "a\\{,\\}"]) From 80567e301128bc6a0bb9d9c747ec802ed9b5156e Mon Sep 17 00:00:00 2001 From: Dorian Peron Date: Fri, 2 May 2025 16:59:48 +0200 Subject: [PATCH 2/2] tests: Remove #[ignore] when possible --- tests/by-util/test_dd.rs | 2 +- tests/by-util/test_ls.rs | 1 - tests/by-util/test_seq.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/by-util/test_dd.rs b/tests/by-util/test_dd.rs index b63905cbc7c..09be7a52cde 100644 --- a/tests/by-util/test_dd.rs +++ b/tests/by-util/test_dd.rs @@ -555,9 +555,9 @@ fn test_ascii_521k_to_file() { ); } -#[ignore] #[cfg(unix)] #[test] +#[ignore] fn test_ascii_5_gibi_to_file() { let tname = "ascii-5G"; let tmp_fn = format!("TESTFILE-{tname}.tmp"); diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index f943bc131c7..8d355339cc5 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -1896,7 +1896,6 @@ fn test_ls_long_ctime() { } #[test] -#[ignore] fn test_ls_order_birthtime() { let scene = TestScenario::new(util_name!()); let at = &scene.fixtures; diff --git a/tests/by-util/test_seq.rs b/tests/by-util/test_seq.rs index e44bf32487d..8f4496f2b1d 100644 --- a/tests/by-util/test_seq.rs +++ b/tests/by-util/test_seq.rs @@ -943,8 +943,8 @@ fn test_parse_out_of_bounds_exponents() { .stdout_only("-0\n1\n"); } -#[ignore] #[test] +#[should_panic] fn test_parse_valid_hexadecimal_float_format_issues() { // These tests detect differences in the representation of floating-point values with GNU seq. // There are two key areas to investigate: