2022-10-22 15:27:04 +00:00
|
|
|
mod common;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn basic() {
|
|
|
|
let name = "my-app";
|
|
|
|
let cmd = common::basic_command(name);
|
|
|
|
common::assert_matches_path(
|
|
|
|
"tests/snapshots/basic.nu",
|
|
|
|
clap_complete_nushell::Nushell,
|
|
|
|
cmd,
|
|
|
|
name,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn feature_sample() {
|
|
|
|
let name = "my-app";
|
|
|
|
let cmd = common::feature_sample_command(name);
|
|
|
|
common::assert_matches_path(
|
|
|
|
"tests/snapshots/feature_sample.nu",
|
|
|
|
clap_complete_nushell::Nushell,
|
|
|
|
cmd,
|
|
|
|
name,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-10-31 12:11:01 +00:00
|
|
|
#[test]
|
|
|
|
fn special_commands() {
|
|
|
|
let name = "my-app";
|
|
|
|
let cmd = common::special_commands_command(name);
|
|
|
|
common::assert_matches_path(
|
|
|
|
"tests/snapshots/special_commands.nu",
|
|
|
|
clap_complete_nushell::Nushell,
|
|
|
|
cmd,
|
|
|
|
name,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-11-02 04:00:19 +00:00
|
|
|
#[test]
|
|
|
|
fn quoting() {
|
|
|
|
let name = "my-app";
|
|
|
|
let cmd = common::quoting_command(name);
|
|
|
|
common::assert_matches_path(
|
|
|
|
"tests/snapshots/quoting.nu",
|
|
|
|
clap_complete_nushell::Nushell,
|
|
|
|
cmd,
|
|
|
|
name,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-10-31 10:32:40 +00:00
|
|
|
#[test]
|
|
|
|
fn aliases() {
|
|
|
|
let name = "my-app";
|
|
|
|
let cmd = common::aliases_command(name);
|
|
|
|
common::assert_matches_path(
|
|
|
|
"tests/snapshots/aliases.nu",
|
|
|
|
clap_complete_nushell::Nushell,
|
|
|
|
cmd,
|
|
|
|
name,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-10-22 15:27:04 +00:00
|
|
|
#[test]
|
|
|
|
fn sub_subcommands() {
|
|
|
|
let name = "my-app";
|
|
|
|
let cmd = common::sub_subcommands_command(name);
|
|
|
|
common::assert_matches_path(
|
|
|
|
"tests/snapshots/sub_subcommands.nu",
|
|
|
|
clap_complete_nushell::Nushell,
|
|
|
|
cmd,
|
|
|
|
name,
|
|
|
|
);
|
|
|
|
}
|
2022-10-31 12:11:01 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn value_hint() {
|
|
|
|
let name = "my-app";
|
|
|
|
let cmd = common::value_hint_command(name);
|
|
|
|
common::assert_matches_path(
|
|
|
|
"tests/snapshots/value_hint.nu",
|
|
|
|
clap_complete_nushell::Nushell,
|
|
|
|
cmd,
|
|
|
|
name,
|
|
|
|
);
|
|
|
|
}
|