diff --git a/crates/nu-command/tests/commands/reject.rs b/crates/nu-command/tests/commands/reject.rs index 15a0cba8a5..a2c052b3e1 100644 --- a/crates/nu-command/tests/commands/reject.rs +++ b/crates/nu-command/tests/commands/reject.rs @@ -141,7 +141,7 @@ fn reject_rows_with_list_spread() { let actual = nu!("let arg = [2 0]; [[name type size];[Cargo.toml file 10mb] [Cargo.lock file 10mb] [src dir 100mb]] | reject ...$arg | to nuon"); assert_eq!( actual.out, - r#"[[name, type, size]; ["Cargo.lock", file, 10000000B]]"# + r#"[[name, type, size]; ["Cargo.lock", file, 10000000b]]"# ); } @@ -150,7 +150,7 @@ fn reject_mixed_with_list_spread() { let actual = nu!("let arg = [type 2]; [[name type size];[Cargp.toml file 10mb] [ Cargo.lock file 10mb] [src dir 100mb]] | reject ...$arg | to nuon"); assert_eq!( actual.out, - r#"[[name, size]; ["Cargp.toml", 10000000B], ["Cargo.lock", 10000000B]]"# + r#"[[name, size]; ["Cargp.toml", 10000000b], ["Cargo.lock", 10000000b]]"# ); } diff --git a/crates/nu-command/tests/format_conversions/nuon.rs b/crates/nu-command/tests/format_conversions/nuon.rs index 6d96566521..e4f6281c01 100644 --- a/crates/nu-command/tests/format_conversions/nuon.rs +++ b/crates/nu-command/tests/format_conversions/nuon.rs @@ -211,7 +211,7 @@ fn to_nuon_filesize() { "# )); - assert_eq!(actual.out, "1024B"); + assert_eq!(actual.out, "1024b"); } #[test] diff --git a/crates/nuon/src/lib.rs b/crates/nuon/src/lib.rs index 135788d69c..24a84dfd5f 100644 --- a/crates/nuon/src/lib.rs +++ b/crates/nuon/src/lib.rs @@ -154,7 +154,7 @@ mod tests { #[test] fn filesize() { - nuon_end_to_end("1024B", Some(Value::test_filesize(1024))); + nuon_end_to_end("1024b", Some(Value::test_filesize(1024))); assert_eq!(from_nuon("1kib", None).unwrap(), Value::test_filesize(1024)); } diff --git a/crates/nuon/src/to.rs b/crates/nuon/src/to.rs index 10850f4313..b8281e8ffe 100644 --- a/crates/nuon/src/to.rs +++ b/crates/nuon/src/to.rs @@ -110,7 +110,7 @@ fn value_to_string( // Propagate existing errors Value::Error { error, .. } => Err(*error.clone()), // FIXME: make filesizes use the shortest lossless representation. - Value::Filesize { val, .. } => Ok(format!("{}B", val.get())), + Value::Filesize { val, .. } => Ok(format!("{}b", val.get())), Value::Float { val, .. } => { // This serialises these as 'nan', 'inf' and '-inf', respectively. if &val.round() == val && val.is_finite() {