Skip to content

Commit cd4aa8c

Browse files
committed
use VERSION redactions
1 parent f90dfec commit cd4aa8c

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

tests/testsuite/version.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
//! Tests for displaying the cargo version.
22
3-
use cargo_test_support::{cargo_process, project};
3+
use cargo_test_support::{cargo_process, project, str};
44

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

99
p.cargo("version")
10-
.with_stdout_data(&format!("cargo {}\n", cargo::version()))
10+
.with_stdout_data(str![[r#"
11+
cargo [VERSION]
12+
13+
"#]])
1114
.run();
1215

1316
p.cargo("--version")
14-
.with_stdout_data(&format!("cargo {}\n", cargo::version()))
17+
.with_stdout_data(str![[r#"
18+
cargo [VERSION]
19+
20+
"#]])
1521
.run();
1622

1723
p.cargo("-V")
18-
.with_stdout_data(&format!("cargo {}\n", cargo::version()))
24+
.with_stdout_data(str![[r#"
25+
cargo [VERSION]
26+
27+
"#]])
1928
.run();
2029
}
2130

@@ -53,7 +62,7 @@ fn verbose() {
5362
cargo_process("-vV")
5463
.with_stdout_data(format!(
5564
"\
56-
cargo {}
65+
cargo [VERSION]
5766
release: [..]
5867
commit-hash: [..]
5968
commit-date: [..]
@@ -63,7 +72,6 @@ libcurl: [..] (sys:[..] [..])
6372
...
6473
os: [..]
6574
",
66-
cargo::version()
6775
))
6876
.run();
6977
}

0 commit comments

Comments
 (0)