resolve intake: a failed resolve still holds the interests it read

This commit is contained in:
Meta Vens 2026-11-28 04:20:45 +01:00
commit 581b29b58f

View file

@ -244,3 +244,11 @@ fn interests_follow_what_the_held_trees_read() {
assert_eq!(rig.interest_calls().last(), Some(&(false, one)));
assert_eq!(rig.interest_calls().len(), 4);
}
#[test]
fn a_surface_that_fails_still_holds_the_interests_it_read() {
let mut rig = Rig::new();
let bad = surface("main", 1, vec![use_of("ghost-use", "ghost"), command_button("go", "undeclared")]);
assert_eq!(codes(&rig.offer(&bad)), vec![Code::UnresolvedUse, Code::UndeclaredCommand]);
assert_eq!(rig.interest_calls(), vec![(true, comp_address("ghost"))]);
}