mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Make if else more lazy (#5386)
This commit is contained in:
@ -43,6 +43,14 @@ fn in_variable_6() -> TestResult {
|
||||
run_test(r#"3 | if $in > 6 { $in - 10 } else { $in * 10 }"#, "30")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn in_and_if_else() -> TestResult {
|
||||
run_test(
|
||||
r#"[1, 2, 3] | if false {} else if true { $in | length }"#,
|
||||
"3",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn help_works_with_missing_requirements() -> TestResult {
|
||||
run_test(r#"each --help | lines | length"#, "29")
|
||||
|
Reference in New Issue
Block a user