move fns in file

This commit is contained in:
Loïc Riegel
2025-03-30 17:49:44 +02:00
parent e738e6f7d9
commit a56036aa10
2 changed files with 263 additions and 227 deletions

View File

@ -16,9 +16,9 @@ fn into_datetime_from_record() {
#[test]
fn into_datetime_from_record_defaults() {
let actual = nu!(r#"{year: 2023, month: 1, day: 2} | into datetime | into record"#);
let actual = nu!(r#"{} | into datetime | into record"#);
let expected = nu!(
r#"{year: 2023, month: 1, day: 2, hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0, timezone: '+00:00'}"#
r#"{year: 0, month: 1, day: 1, hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0, timezone: '+00:00'}"#
);
assert_eq!(expected.out, actual.out);
@ -67,8 +67,6 @@ fn into_datetime_from_record_fails_with_invalid_timezone() {
// Tests invalid usage
// TODO: required key missing
#[test]
fn into_datetime_from_record_fails_with_unknown_key() {
let actual = nu!(r#"{year: 2023, unknown: 1} | into datetime"#);