Skip to content

Commit

Permalink
verify that unstable flag is gated correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaeroxe committed Oct 3, 2024
1 parent 8cc56ca commit 4ddd017
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/testsuite/freshness_checksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ use cargo_test_support::{

use super::death;

#[cargo_test]
fn non_nightly_fails() {
let p = project().file("src/main.rs", "fn main() {}").build();
let mut cmd = p.cargo("build").arg("-Zchecksum-freshness").build_command();
let output = cmd.output().unwrap();
assert!(
String::from_utf8(output.stderr)
.unwrap()
.contains("error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel")
);
assert!(!output.status.success());
}

#[cargo_test(nightly, reason = "requires -Zchecksum-hash-algorithm")]
fn checksum_actually_uses_checksum() {
let p = project()
Expand Down

0 comments on commit 4ddd017

Please sign in to comment.