Skip to content
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
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rustls::{ClientConfig, RootCertStore};
use webpki_roots::TLS_SERVER_ROOTS;

#[derive(Parser)]
#[command(name = "diffed-places-pipeline")]
#[command(name = "diffed-places-pipeline", version)]
struct Cli {
#[command(subcommand)]
command: Option<Commands>,
Expand Down
11 changes: 11 additions & 0 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,14 @@ fn test_no_subcommand() {
.failure()
.stderr(predicates::str::contains("no subcommand given"));
}

#[test]
fn test_version_flag() {
// Asserts against CARGO_PKG_VERSION (rather than a hardcoded string) so
// this doesn't need updating every time cut-release.sh bumps the version.
Command::new(cargo_bin!("osm-diffs"))
.arg("--version")
.assert()
.success()
.stdout(predicates::str::contains(env!("CARGO_PKG_VERSION")));
}
Loading