mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 23:07:46 +02:00
Differentiate internal signature from external signature w.r.t. help (#5667)
* Differentiate internal signature from external signature w.r.t. help * Add in the --help flag to default externs in default config * Remove unusued build_extern Co-authored-by: mjclements <clements.michael.james@gmail.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use crate::tests::{fail_test, run_test, TestResult};
|
||||
use crate::tests::{fail_test, run_test, run_test_contains, TestResult};
|
||||
|
||||
#[test]
|
||||
fn no_scope_leak1() -> TestResult {
|
||||
@ -117,3 +117,16 @@ fn allow_missing_optional_params() -> TestResult {
|
||||
"5",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn help_present_in_def() -> TestResult {
|
||||
run_test_contains("def foo [] {}; help foo;", "Display this help message")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn help_not_present_in_extern() -> TestResult {
|
||||
run_test(
|
||||
"module test {export extern \"git fetch\" []}; use test; help git fetch",
|
||||
"Usage:\n > git fetch",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user