Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test cases for the CLI help menu #4904

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions crates/uv/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ impl TestContext {
}
}

/// Create a `uv` command for testing.
pub fn command(&self) -> Command {
let mut command = Command::new(get_bin());
self.add_shared_args(&mut command);
command
}

/// Shared behaviour for almost all test commands.
///
/// * Use a temporary cache directory
Expand Down Expand Up @@ -359,6 +366,14 @@ impl TestContext {
command
}

/// Create a `uv help` command with options shared across scenarios.
#[allow(clippy::unused_self)]
pub fn help(&self) -> Command {
let mut command = Command::new(get_bin());
command.arg("help");
command
}

/// Create a `uv sync` command with options shared across scenarios.
pub fn sync(&self) -> Command {
let mut command = Command::new(get_bin());
Expand Down
Loading
Loading