mirror of
https://github.com/nushell/nushell.git
synced 2024-12-20 06:02:26 +01:00
parent
1e86af2fb9
commit
b86c6db400
@ -1,13 +1,11 @@
|
|||||||
use nu_test_support::{nu, pipeline};
|
use nu_test_support::{nu, pipeline};
|
||||||
|
|
||||||
// FIXME: jt: needs more work
|
|
||||||
#[ignore]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn cal_full_year() {
|
fn cal_full_year() {
|
||||||
let actual = nu!(
|
let actual = nu!(
|
||||||
cwd: ".", pipeline(
|
cwd: ".", pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal -y --full-year 2010 | first | to json
|
cal -y --full-year 2010 | first | to json -r
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -16,14 +14,12 @@ fn cal_full_year() {
|
|||||||
assert_eq!(actual.out, first_week_2010_json);
|
assert_eq!(actual.out, first_week_2010_json);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: jt: needs more work
|
|
||||||
#[ignore]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn cal_february_2020_leap_year() {
|
fn cal_february_2020_leap_year() {
|
||||||
let actual = nu!(
|
let actual = nu!(
|
||||||
cwd: ".", pipeline(
|
cwd: ".", pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal -ym --full-year 2020 --month-names | where month == "february" | to json
|
cal -ym --full-year 2020 --month-names | where month == "february" | to json -r
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -56,14 +52,12 @@ fn cal_rows_in_2020() {
|
|||||||
assert!(actual.out.contains("62"));
|
assert!(actual.out.contains("62"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: jt: needs more work
|
|
||||||
#[ignore]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn cal_week_day_start_monday() {
|
fn cal_week_day_start_monday() {
|
||||||
let actual = nu!(
|
let actual = nu!(
|
||||||
cwd: ".", pipeline(
|
cwd: ".", pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal --full-year 2020 -m --month-names --week-start monday | where month == january | to json
|
cal --full-year 2020 -m --month-names --week-start monday | where month == january | to json -r
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -72,16 +66,14 @@ fn cal_week_day_start_monday() {
|
|||||||
assert_eq!(actual.out, cal_january_json);
|
assert_eq!(actual.out, cal_january_json);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: jt: needs more work
|
|
||||||
#[ignore]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn cal_sees_pipeline_year() {
|
fn cal_sees_pipeline_year() {
|
||||||
let actual = nu!(
|
let actual = nu!(
|
||||||
cwd: ".", pipeline(
|
cwd: ".", pipeline(
|
||||||
r#"
|
r#"
|
||||||
cal --full-year 1020 | get monday | first 3 | to json
|
cal --full-year 1020 | get monday | first 4 | to json -r
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
assert_eq!(actual.out, "[3,10,17]");
|
assert_eq!(actual.out, "[null,3,10,17]");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user