Remove nuon changes

This commit is contained in:
Ian Manske 2024-11-23 16:59:23 -08:00
parent 6c7a76b15c
commit 8f755c755d
4 changed files with 5 additions and 5 deletions

View File

@ -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]]"#
);
}

View File

@ -211,7 +211,7 @@ fn to_nuon_filesize() {
"#
));
assert_eq!(actual.out, "1024B");
assert_eq!(actual.out, "1024b");
}
#[test]

View File

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

View File

@ -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() {