mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Fix command name lookup for known externals (#7830)
Fixes https://github.com/nushell/nushell/issues/7822
This commit is contained in:
@ -76,3 +76,34 @@ fn known_external_misc_values() -> TestResult {
|
||||
"abc a b c",
|
||||
)
|
||||
}
|
||||
|
||||
/// GitHub issue #7822
|
||||
#[test]
|
||||
fn known_external_subcommand_from_module() -> TestResult {
|
||||
run_test_contains(
|
||||
r#"
|
||||
module cargo {
|
||||
export extern check []
|
||||
};
|
||||
use cargo;
|
||||
cargo check -h
|
||||
"#,
|
||||
"cargo check",
|
||||
)
|
||||
}
|
||||
|
||||
/// GitHub issue #7822
|
||||
#[test]
|
||||
fn known_external_aliased_subcommand_from_module() -> TestResult {
|
||||
run_test_contains(
|
||||
r#"
|
||||
module cargo {
|
||||
export extern check []
|
||||
};
|
||||
use cargo;
|
||||
alias cc = cargo check;
|
||||
cc -h
|
||||
"#,
|
||||
"cargo check",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user