changed the way durations and filesizes are parsed (#6640)

This commit is contained in:
Darren Schroeder
2022-09-29 13:24:17 -05:00
committed by GitHub
parent 6aa8a0073b
commit 6486364610
3 changed files with 151 additions and 109 deletions

View File

@ -402,6 +402,18 @@ fn duration_decimal_math_with_all_units() {
assert_eq!(actual.out, "1wk 3day 8hr 10min 16sec 121ms 11µs 12ns");
}
#[test]
fn duration_decimal_dans_test() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
3.14sec
"#
));
assert_eq!(actual.out, "3sec 140ms");
}
#[test]
fn duration_math_with_negative() {
let actual = nu!(