]> Repositorios git - scryer-prolog.git/commitdiff
Minimal reproduction of faulty behaviour seen in integration tests
authorNicolas Luck <[email protected]>
Mon, 29 Jan 2024 14:26:06 +0000 (15:26 +0100)
committerNicolas Luck <[email protected]>
Mon, 29 Jan 2024 14:26:06 +0000 (15:26 +0100)
src/machine/lib_machine.rs

index d355ee7ebc0a5679c1915be08b3c3348f79bdc04..6756a953b611b70b785f434e4f02f9e31176549a 100644 (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)
+        );
+    }
 }