Skip to content
Snippets Groups Projects
Ignore-a-test.patch 2.59 KiB
Newer Older
From: Sylvestre Ledru <sylvestre@debian.org>
Date: Fri, 9 Apr 2021 10:14:41 +0200
Subject: 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

Origin: upstream, https://github.com/uutils/coreutils/commit/9ae4928b7b4f43495921fe8ac6128ea226d20dbd
---
 src/uu/sort/src/sort.rs     | 6 ++----
 src/uu/stdbuf/src/stdbuf.rs | 3 +--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/uu/sort/src/sort.rs b/src/uu/sort/src/sort.rs
index 08936ff..cf6c258 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 a61ba96..67ed9a8 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 \