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
This commit is contained in:
Sylvestre Ledru 2021-04-09 10:14:41 +02:00 committed by GitHub
parent 8474249e5f
commit 9ae4928b7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View file

@ -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
}

View file

@ -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 \

View file

@ -35,6 +35,7 @@ fn test_empty() {
}
#[test]
#[ignore]
fn test_arg_overrides_stdin() {
let (at, mut ucmd) = at_and_ucmd!();
let input = "foobarfoobar";