Watch
0
0
Fork
You've already forked hyperhive
0

refuse a dependency add of an issue on itself

This commit is contained in:
atlas 2026-10-27 14:38:06 +01:00 • committed by mara
commit a70b25847e

View file

@ -149,3 +149,17 @@ fn non_cyclic_add_reaches_the_forge() {
fn tag(n: u64) -> String {
format!("{}{n}", '#')
}
#[test]
fn self_dependency_is_refused_before_any_post() {
let (ok, stderr, posts) = add("self", "10", "10");
assert!(!ok);
assert!(
stderr.contains(&format!(
"{} cannot depend on itself, which would create a cycle",
tag(10)
)),
"{stderr}"
);
assert_eq!(posts, 0);
}