mirror of
https://github.com/rust-lang/cargo
synced 2024-09-17 23:01:51 +00:00
add test for wrong_case in registry
This commit is contained in:
parent
3fafca1742
commit
8a717d32db
|
@ -161,7 +161,7 @@ fn wrong_case() {
|
|||
.file("src/main.rs", "fn main() {}")
|
||||
.build();
|
||||
|
||||
// TODO: #5678 to make this work or fleas give better error message
|
||||
// TODO: #5678 to make this work or at least give better error message
|
||||
assert_that(
|
||||
p.cargo("build"),
|
||||
execs().with_status(101).with_stderr(
|
||||
|
@ -195,7 +195,7 @@ fn mis_hyphenated() {
|
|||
.file("src/main.rs", "fn main() {}")
|
||||
.build();
|
||||
|
||||
// TODO: #2775 to make this work or fleas give better error message
|
||||
// TODO: #2775 to make this work or at least give better error message
|
||||
assert_that(
|
||||
p.cargo("build"),
|
||||
execs().with_status(101).with_stderr(
|
||||
|
|
|
@ -440,6 +440,46 @@ fn resolving_incompat_versions() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn resolving_wrong_case_from_registry() {
|
||||
// In the future we may #5678 allow this to happen.
|
||||
// For back compatibility reasons, we probably won't.
|
||||
// But we may want to future prove ourselves by understanding it.
|
||||
// This test documents the current behavior.
|
||||
let reg = registry(vec![
|
||||
pkg!(("foo", "1.0.0")),
|
||||
pkg!("bar" => ["Foo"]),
|
||||
]);
|
||||
|
||||
assert!(
|
||||
resolve(
|
||||
&pkg_id("root"),
|
||||
vec![dep("bar")],
|
||||
®
|
||||
).is_err()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn resolving_mis_hyphenated_from_registry() {
|
||||
// In the future we may #2775 allow this to happen.
|
||||
// For back compatibility reasons, we probably won't.
|
||||
// But we may want to future prove ourselves by understanding it.
|
||||
// This test documents the current behavior.
|
||||
let reg = registry(vec![
|
||||
pkg!(("fo-o", "1.0.0")),
|
||||
pkg!("bar" => ["fo_o"]),
|
||||
]);
|
||||
|
||||
assert!(
|
||||
resolve(
|
||||
&pkg_id("root"),
|
||||
vec![dep("bar")],
|
||||
®
|
||||
).is_err()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn resolving_backtrack() {
|
||||
let reg = registry(vec![
|
||||
|
|
Loading…
Reference in a new issue