Skip to content

Commit 2814ca2

Browse files
committed
fuzzer found a bad case
1 parent 50af117 commit 2814ca2

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

tests/testsuite/resolve.rs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,3 +1201,43 @@ fn large_conflict_cache() {
12011201
let reg = registry(input);
12021202
let _ = resolve(&pkg_id("root"), root_deps, &reg);
12031203
}
1204+
1205+
#[test]
1206+
fn conflict_store_bug() {
1207+
let input = vec![
1208+
pkg!(("A", "0.0.3")),
1209+
pkg!(("A", "0.0.5")),
1210+
pkg!(("A", "0.0.9") => [dep("bad"),]),
1211+
pkg!(("A", "0.0.10") => [dep("bad"),]),
1212+
pkg!(("L-sys", "0.0.1") => [dep("bad"),]),
1213+
pkg!(("L-sys", "0.0.5")),
1214+
pkg!(("R", "0.0.4") => [
1215+
dep_req("L-sys", "= 0.0.5"),
1216+
]),
1217+
pkg!(("R", "0.0.6")),
1218+
pkg!(("a-sys", "0.0.5")),
1219+
pkg!(("a-sys", "0.0.11")),
1220+
pkg!(("c", "0.0.12") => [
1221+
dep_req("R", ">= 0.0.3, <= 0.0.4"),
1222+
]),
1223+
pkg!(("c", "0.0.13") => [
1224+
dep_req("a-sys", ">= 0.0.8, <= 0.0.11"),
1225+
]),
1226+
pkg!(("c0", "0.0.6") => [
1227+
dep_req("L-sys", "<= 0.0.2"),
1228+
]),
1229+
pkg!(("c0", "0.0.10") => [
1230+
dep_req("A", ">= 0.0.9, <= 0.0.10"),
1231+
dep_req("a-sys", "= 0.0.5"),
1232+
]),
1233+
pkg!("j" => [
1234+
dep_req("A", ">= 0.0.3, <= 0.0.5"),
1235+
dep_req("R", ">=0.0.4, <= 0.0.6"),
1236+
dep_req("c", ">= 0.0.9"),
1237+
dep_req("c0", ">= 0.0.6"),
1238+
]),
1239+
];
1240+
1241+
let reg = registry(input.clone());
1242+
let _ = resolve_and_validated(&pkg_id("root"), vec![dep("j")], &reg);
1243+
}

0 commit comments

Comments
 (0)