Renamed time units (#2356)

* Changed time units as outlined in issue #2353.
Also applied changes to to_str for Unit - not sure if that was what was wanted.

* Forgot the tests!

* Updated primitive.rs to match changes.

* Updated where example to match changes.

* And the html test!
This commit is contained in:
Matt Clarke
2020-08-15 21:03:28 +02:00
committed by GitHub
parent c6588c661a
commit c59f860b48
6 changed files with 26 additions and 26 deletions

View File

@ -166,11 +166,11 @@ fn duration_math() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
= 1w + 1d
= 1wk + 1day
"#
));
assert_eq!(actual.out, "8d");
assert_eq!(actual.out, "8day");
}
#[test]
@ -178,11 +178,11 @@ fn duration_math_with_nanoseconds() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
= 1w + 10ns
= 1wk + 10ns
"#
));
assert_eq!(actual.out, "7d 10ns");
assert_eq!(actual.out, "7day 10ns");
}
#[test]
@ -190,11 +190,11 @@ fn duration_math_with_negative() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
= 1d - 1w
= 1day - 1wk
"#
));
assert_eq!(actual.out, "-6d");
assert_eq!(actual.out, "-6day");
}
#[test]