From 3c79326da5ea175ff1e323c67132afeba4eeae5f Mon Sep 17 00:00:00 2001 From: hermes Date: Thu, 15 Oct 2026 04:11:06 +0000 Subject: [PATCH] test: cover idx --version and -V Co-Authored-By: Claude Opus 5.5 --- crates/idx-cli/tests/cli.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/idx-cli/tests/cli.rs b/crates/idx-cli/tests/cli.rs index 9baa2f0..f99edd5 100644 --- a/crates/idx-cli/tests/cli.rs +++ b/crates/idx-cli/tests/cli.rs @@ -418,6 +418,17 @@ fn version_prints_cargo_version() { .stdout(predicate::str::contains(env!("CARGO_PKG_VERSION"))); } +#[test] +fn version_flags_print_cargo_version() { + for flag in ["--version", "-V"] { + test_bin("version-flag") + .arg(flag) + .assert() + .success() + .stdout(format!("idx {}\n", env!("CARGO_PKG_VERSION"))); + } +} + #[test] fn quote_table_with_mock_contains_expected_columns() { test_bin("quote-table")