test: cover idx --version and -V

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hermes 2026-10-15 04:11:06 +00:00
commit 3c79326da5

View file

@ -418,6 +418,17 @@ fn version_prints_cargo_version() {
.stdout(predicate::str::contains(env!("CARGO_PKG_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] #[test]
fn quote_table_with_mock_contains_expected_columns() { fn quote_table_with_mock_contains_expected_columns() {
test_bin("quote-table") test_bin("quote-table")