Skip to content

Commit

Permalink
test: relax the assertion for compilation with OpenSSL in the testsui…
Browse files Browse the repository at this point in the history
…te version
  • Loading branch information
henry40408 committed Jun 19, 2024
1 parent 09fe7b8 commit 5d44b52
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions tests/testsuite/version.rs
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
//! Tests for displaying the cargo version.

use cargo_test_support::{cargo_process, project, str};
use snapbox::IntoData as _;

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

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

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

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

Expand Down Expand Up @@ -60,16 +52,18 @@ fn version_works_with_bad_target_dir() {
fn verbose() {
// This is mainly to check that it doesn't explode.
cargo_process("-vV")
.with_stdout_data(str![[r#"
.with_stdout_data(
str![[r#"
cargo [..] ([..] [..])
release: [..]
commit-hash: [..]
commit-date: [..]
host: [HOST_TARGET]
libgit2: [..] (sys:[..] [..])
libcurl: [..] (sys:[..] [..])
os: [..]
"#]])
...
"#]]
.unordered(),
)
.run();
}

0 comments on commit 5d44b52

Please sign in to comment.