mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Improve duration math and printing (#1748)
* Improve duration math and printing * Fix test
This commit is contained in:
@ -96,6 +96,18 @@ fn parens_precedence() {
|
||||
assert_eq!(actual.out, "12");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn duration_math() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
= 1w + 1d
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "8:00:00:00");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compound_comparison() {
|
||||
let actual = nu!(
|
||||
|
Reference in New Issue
Block a user