-> CargoResult<()> {
// See if we visited ourselves
if !visited.insert(id) {
- bail!("cyclic package dependency: package `{}` depends on itself",
- id);
+ bail!("cyclic package dependency: package `{}` depends on itself. Cycle (not in order): {:#?}",
+ id, visited);
}
// If we've already checked this node no need to recurse again as we'll
.build();
assert_that(p.cargo("build"),
execs().with_status(101)
- .with_stderr("\
-[ERROR] cyclic package dependency: package `test v0.0.0 ([..])` depends on itself
-"));
+ .with_stderr_contains("\
+[ERROR] cyclic package dependency: package `test v0.0.0 ([..])` depends on itself[..]"));
}
#[test]
assert_that(p.cargo("build").arg("-v"),
execs().with_status(101)
- .with_stderr("\
-[ERROR] cyclic package dependency: package `a v0.0.1 ([..])` depends on itself
-"));
+ .with_stderr_contains("\
+[ERROR] cyclic package dependency: package `a v0.0.1 ([..]")
+ .with_stderr_contains("[..]depends on itself[..]"));
}
#[test]