mirror of
https://github.com/nushell/nushell.git
synced 2024-11-24 17:34:00 +01:00
Remove nuon changes
This commit is contained in:
parent
6c7a76b15c
commit
8f755c755d
@ -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]]"#
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ fn to_nuon_filesize() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "1024B");
|
||||
assert_eq!(actual.out, "1024b");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user