mirror of
https://github.com/nushell/nushell.git
synced 2025-08-19 10:52:54 +02:00
Add support for custom subcommands (#2814)
* Add support for custom subcommands * clippy
This commit is contained in:
@@ -368,6 +368,18 @@ fn run_custom_command_with_flag_missing() {
|
||||
assert_eq!(actual.out, "empty");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn run_custom_subcommand() {
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
r#"
|
||||
def "str double" [x] { echo $x $x | str collect }; str double bob
|
||||
"#
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, "bobbob");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn set_variable() {
|
||||
let actual = nu!(
|
||||
|
Reference in New Issue
Block a user