mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Require input for date format
(#7043)
This commit is contained in:
@ -5,7 +5,7 @@ fn formatter_not_valid() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
date format '%N'
|
||||
date now | date format '%N'
|
||||
"#
|
||||
)
|
||||
);
|
||||
@ -13,6 +13,19 @@ fn formatter_not_valid() {
|
||||
assert!(actual.err.contains("invalid format"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fails_without_input() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
date format "%c"
|
||||
"#
|
||||
)
|
||||
);
|
||||
|
||||
assert!(actual.err.contains("Unsupported input"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn locale_format_respect_different_locale() {
|
||||
let actual = nu!(
|
||||
|
Reference in New Issue
Block a user