mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
test: lockfile path unstable feature tests
This commit is contained in:
parent
4baaaeccea
commit
aa7ead5e72
@ -10,6 +10,50 @@ use cargo_test_support::{
|
||||
basic_bin_manifest, cargo_test, project, symlink_supported, ProjectBuilder,
|
||||
};
|
||||
|
||||
///////////////////////////////
|
||||
//// Unstable feature tests start
|
||||
///////////////////////////////
|
||||
|
||||
#[cargo_test]
|
||||
fn must_have_unstable_options() {
|
||||
let lockfile_path = "mylockfile/is/burried/Cargo.lock";
|
||||
let p = make_project().build();
|
||||
|
||||
p.cargo("generate-lockfile")
|
||||
.masquerade_as_nightly_cargo(&["lockfile-path"])
|
||||
.arg("--lockfile-path")
|
||||
.arg(lockfile_path)
|
||||
.with_stderr_data(str![[
|
||||
r#"[ERROR] the `--lockfile-path` flag is unstable, pass `-Z unstable-options` to enable it
|
||||
See https://github.com/rust-lang/cargo/issues/5707 for more information about the `--lockfile-path` flag.
|
||||
|
||||
"#]])
|
||||
.with_status(101)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn must_be_nightly() {
|
||||
let lockfile_path = "mylockfile/is/burried/Cargo.lock";
|
||||
let p = make_project().build();
|
||||
|
||||
p.cargo("generate-lockfile")
|
||||
.arg("-Zunstable-options")
|
||||
.arg("--lockfile-path")
|
||||
.arg(lockfile_path)
|
||||
.with_stderr_data(str![[
|
||||
r#"[ERROR] the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel
|
||||
See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
|
||||
|
||||
"#]])
|
||||
.with_status(101)
|
||||
.run();
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
//// Unstable feature tests end
|
||||
///////////////////////////////
|
||||
|
||||
#[cargo_test]
|
||||
fn basic_lockfile_created() {
|
||||
let lockfile_path = "mylockfile/is/burried/Cargo.lock";
|
||||
|
Loading…
x
Reference in New Issue
Block a user