fix cal tests (#925)

* fix 1 test

* missed 1 test
This commit is contained in:
Darren Schroeder 2022-02-04 07:24:36 -06:00 committed by GitHub
parent 1e86af2fb9
commit b86c6db400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,11 @@
use nu_test_support::{nu, pipeline};
// FIXME: jt: needs more work
#[ignore]
#[test]
fn cal_full_year() {
let actual = nu!(
cwd: ".", pipeline(
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);
}
// FIXME: jt: needs more work
#[ignore]
#[test]
fn cal_february_2020_leap_year() {
let actual = nu!(
cwd: ".", pipeline(
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"));
}
// FIXME: jt: needs more work
#[ignore]
#[test]
fn cal_week_day_start_monday() {
let actual = nu!(
cwd: ".", pipeline(
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);
}
// FIXME: jt: needs more work
#[ignore]
#[test]
fn cal_sees_pipeline_year() {
let actual = nu!(
cwd: ".", pipeline(
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]");
}