mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
@ -51,3 +51,15 @@ fn cal_rows_in_2020() {
|
||||
|
||||
assert!(actual.out.contains("62"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cal_sees_pipeline_year() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
echo 1020 | cal --full-year $it | get monday | first 3 | to json
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "[3,10,17]");
|
||||
}
|
||||
|
@ -108,6 +108,18 @@ fn duration_math() {
|
||||
assert_eq!(actual.out, "8:00:00:00");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn it_math() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
echo 1020 | = $it + 10
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "1030");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compound_comparison() {
|
||||
let actual = nu!(
|
||||
|
Reference in New Issue
Block a user