Minimal reproduction of faulty behaviour seen in integration tests

This commit is contained in:
Nicolas Luck
2024-01-29 15:26:06 +01:00
parent 7e973a6da6
commit 2e728c7051

View File

@@ -533,4 +533,27 @@ mod tests {
),])) ),]))
); );
} }
#[test]
fn dont_return_partial_matches() {
let mut machine = Machine::new_lib();
machine.consult_module_string(
"facts",
String::from(
r#"
:- discontiguous(property_resolve/2).
subject_class("Todo", c).
"#,
),
);
let query =
String::from(r#"subject_class("Todo", C), property_resolve(C, "isLiked")."#);
let output = machine.run_query(query);
assert_eq!(
output,
Ok(QueryResolution::False)
);
}
} }