From 9ae4928b7b4f43495921fe8ac6128ea226d20dbd Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 9 Apr 2021 10:14:41 +0200 Subject: [PATCH] Ignore a test (#2053) * Disable chksum: test_arg_overrides_stdin fails often with: ---- test_cksum::test_arg_overrides_stdin stdout ---- current_directory_resolved: touch: /tmp/.tmpv9hydc/a run: /target/x86_64-unknown-linux-gnu/debug/coreutils cksum a thread 'test_cksum::test_arg_overrides_stdin' panicked at 'Broken pipe (os error 32)', tests/common/util.rs:742:37 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace * rustfmt the recent change --- src/uu/sort/src/sort.rs | 6 ++---- src/uu/stdbuf/src/stdbuf.rs | 3 +-- tests/by-util/test_cksum.rs | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/uu/sort/src/sort.rs b/src/uu/sort/src/sort.rs index 36e6ad71e..4e0e25d65 100644 --- a/src/uu/sort/src/sort.rs +++ b/src/uu/sort/src/sort.rs @@ -665,9 +665,7 @@ fn get_leading_gen(a: &str) -> String { for c in p_iter.to_owned() { let next_char_numeric = p_iter.peek().unwrap_or(&'\0').is_numeric(); // Only general numeric recognizes e notation and, see block below, the '+' sign - if (c.eq(&'e') && !next_char_numeric) - || (c.eq(&'E') && !next_char_numeric) - { + if (c.eq(&'e') && !next_char_numeric) || (c.eq(&'E') && !next_char_numeric) { r = a.split(c).next().unwrap_or("").to_owned(); break; // If positive sign and next char is not numeric, split at postive sign at keep trailing numbers @@ -813,7 +811,7 @@ fn human_numeric_convert(a: &str) -> f64 { 'E' => 1E18, 'Z' => 1E21, 'Y' => 1E24, - _ => 1f64, + _ => 1f64, }; num_part * suffix } diff --git a/src/uu/stdbuf/src/stdbuf.rs b/src/uu/stdbuf/src/stdbuf.rs index a61ba967b..67ed9a838 100644 --- a/src/uu/stdbuf/src/stdbuf.rs +++ b/src/uu/stdbuf/src/stdbuf.rs @@ -80,8 +80,7 @@ fn print_version() { fn print_usage(opts: &Options) { let brief = "Run COMMAND, with modified buffering operations for its standard streams\n \ Mandatory arguments to long options are mandatory for short options too."; - let explanation = - "If MODE is 'L' the corresponding stream will be line buffered.\n \ + let explanation = "If MODE is 'L' the corresponding stream will be line buffered.\n \ This option is invalid with standard input.\n\n \ If MODE is '0' the corresponding stream will be unbuffered.\n\n \ Otherwise MODE is a number which may be followed by one of the following:\n\n \ diff --git a/tests/by-util/test_cksum.rs b/tests/by-util/test_cksum.rs index 8c8a551a0..8b41c782c 100644 --- a/tests/by-util/test_cksum.rs +++ b/tests/by-util/test_cksum.rs @@ -35,6 +35,7 @@ fn test_empty() { } #[test] +#[ignore] fn test_arg_overrides_stdin() { let (at, mut ucmd) = at_and_ucmd!(); let input = "foobarfoobar";