add more tests

This commit is contained in:
Mark Thom
2018-09-24 22:39:15 -06:00
parent 58ed374363
commit af5f08ddb2
2 changed files with 8 additions and 1 deletions

View File

@@ -2019,4 +2019,9 @@ fn test_queries_on_string_lists()
assert_prolog_success!(&mut wam, "?- partial_string(\"abc\", X), matcher(X, Y).",
[["X = [a, b, c]", "Y = []"],
["X = [a, b, c | _]", "Y = _"]]);
assert_prolog_success!(&mut wam, "?- partial_string(\"a\", X), matcher(X, Y).",
[["X = [a, b, c]", "Y = []"],
["X = [a, b, c | _]", "Y = _"]]);
assert_prolog_failure!(&mut wam, "?- partial_string(\"abc\", X), partial_string(\"bc\", Y), X = [a | Y].");
}