mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
test(registry): Show current too-new schema error
This reproduces the problem in #10623.
This commit is contained in:
parent
293b71a961
commit
385dfb6298
@ -2632,6 +2632,41 @@ fn ignores_unknown_index_version() {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn unknown_index_version_error() {
|
||||
// If the version field is not understood, it is ignored.
|
||||
Package::new("bar", "1.0.1")
|
||||
.schema_version(u32::MAX)
|
||||
.publish();
|
||||
|
||||
let p = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
[package]
|
||||
name = "foo"
|
||||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
bar = "1.0"
|
||||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.build();
|
||||
|
||||
p.cargo("generate-lockfile")
|
||||
.with_status(101)
|
||||
.with_stderr(
|
||||
"\
|
||||
[UPDATING] `dummy-registry` index
|
||||
[ERROR] no matching package named `bar` found
|
||||
location searched: registry `crates-io`
|
||||
required by package `foo v0.1.0 ([CWD])`
|
||||
",
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn protocol() {
|
||||
cargo_process("install bar")
|
||||
|
Loading…
x
Reference in New Issue
Block a user