forked from extern/nushell
suppress the parser error for an insufficient number of required arguments if the named keyword argument 'help' is given (#1659)
This commit is contained in:
@ -30,3 +30,32 @@ fn summarizes() {
|
||||
// 50%
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn help() {
|
||||
Playground::setup("histogram_test_help", |dirs, _sandbox| {
|
||||
let help_command = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
help histogram
|
||||
"#
|
||||
));
|
||||
|
||||
let help_short = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
histogram -h
|
||||
"#
|
||||
));
|
||||
|
||||
let help_long = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
histogram --help
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(help_short, help_command);
|
||||
assert_eq!(help_long, help_command);
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user