]> Repositorios git - scryer-prolog.git/commitdiff
Add tests for #2056
authorbakaq <[email protected]>
Sun, 1 Oct 2023 00:33:42 +0000 (21:33 -0300)
committerbakaq <[email protected]>
Sun, 1 Oct 2023 00:33:42 +0000 (21:33 -0300)
src/tests/dif.pl

index bb1c76d6934832c45e5bce123bbb516a13b7dbfe..752f14054610bd44d9bb7c56707f74d3cb13f8a6 100644 (file)
@@ -196,6 +196,17 @@ test("scryer-prolog#1956",(
     Res = []
 )).
 
+% https://github.com/mthom/scryer-prolog/issues/2056
+test("scryer-prolog#2056",(
+    set_prolog_flag(occurs_check, false),
+    C=[D|E],
+    D=[C],
+    A=[A],
+    dif(A,[D]),
+
+    \+ E=[]
+)).
+
 main :-
     findall(test(Name, Goal), test(Name, Goal), Tests),
     run_tests(Tests, Failed),