Skip to content

Commit

Permalink
use VERSION redactions
Browse files Browse the repository at this point in the history
  • Loading branch information
heisen-li committed Jun 21, 2024
1 parent f90dfec commit cd4aa8c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions tests/testsuite/version.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
//! Tests for displaying the cargo version.

use cargo_test_support::{cargo_process, project};
use cargo_test_support::{cargo_process, project, str};

#[cargo_test]
fn simple() {
let p = project().build();

p.cargo("version")
.with_stdout_data(&format!("cargo {}\n", cargo::version()))
.with_stdout_data(str![[r#"
cargo [VERSION]
"#]])
.run();

p.cargo("--version")
.with_stdout_data(&format!("cargo {}\n", cargo::version()))
.with_stdout_data(str![[r#"
cargo [VERSION]
"#]])
.run();

p.cargo("-V")
.with_stdout_data(&format!("cargo {}\n", cargo::version()))
.with_stdout_data(str![[r#"
cargo [VERSION]
"#]])
.run();
}

Expand Down Expand Up @@ -53,7 +62,7 @@ fn verbose() {
cargo_process("-vV")
.with_stdout_data(format!(
"\
cargo {}
cargo [VERSION]
release: [..]
commit-hash: [..]
commit-date: [..]
Expand All @@ -63,7 +72,6 @@ libcurl: [..] (sys:[..] [..])
...
os: [..]
",
cargo::version()
))
.run();
}

0 comments on commit cd4aa8c

Please sign in to comment.