1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

numfmt: don't round floats if --from is "none"

This commit is contained in:
Daniel Hofstetter 2022-07-24 14:06:42 +02:00
parent 62305e67d1
commit 34b4853890
3 changed files with 19 additions and 1 deletions

View file

@ -2,6 +2,14 @@
use crate::common::util::*;
#[test]
fn test_should_not_round_floats() {
new_ucmd!()
.args(&["0.99", "1.01", "1.1", "1.22", ".1", "-0.1"])
.succeeds()
.stdout_is("0.99\n1.01\n1.1\n1.22\n0.1\n-0.1\n");
}
#[test]
fn test_from_si() {
new_ucmd!()