Add the default help flag

This commit is contained in:
JT
2021-10-14 06:53:27 +13:00
parent ff6cc2cbdd
commit fdd2c35fd9
8 changed files with 89 additions and 41 deletions

View File

@ -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")
}