mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 14:01:01 +02:00
Add the default help flag
This commit is contained in:
13
src/tests.rs
13
src/tests.rs
@ -764,3 +764,16 @@ fn custom_switch4() -> TestResult {
|
||||
fn bad_var_name() -> TestResult {
|
||||
fail_test(r#"let $"foo bar" = 4"#, "can't contain")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn long_flag() -> TestResult {
|
||||
run_test(
|
||||
r#"([a, b, c] | each --numbered { if $it.index == 1 { 100 } else { 0 } }).1"#,
|
||||
"100",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn help_works_with_missing_requirements() -> TestResult {
|
||||
run_test(r#"each --help | lines | length"#, "10")
|
||||
}
|
||||
|
Reference in New Issue
Block a user