mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 23:17:54 +02:00
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:
@ -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]
|
||||
|
Reference in New Issue
Block a user