mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Force floats to output a decimal in nuon (#5768)
* Force floats to output a decimal in nuon * Add test
This commit is contained in:
@ -190,3 +190,15 @@ fn read_bool() {
|
||||
|
||||
assert_eq!(actual.out, "true")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn float_doesnt_become_int() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
1.0 | to nuon
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "1.0")
|
||||
}
|
||||
|
Reference in New Issue
Block a user