]> Repositorios git - scryer-prolog.git/commitdiff
add more tests
authorMark Thom <[email protected]>
Tue, 25 Sep 2018 04:39:15 +0000 (22:39 -0600)
committerMark Thom <[email protected]>
Tue, 25 Sep 2018 04:39:15 +0000 (22:39 -0600)
Cargo.lock
src/tests.rs

index 98b175f95eab1192b380b2ad737605bc82b7658f..da798706cd8d82d9f496be527e49636a4126c368 100644 (file)
@@ -87,6 +87,7 @@ dependencies = [
 [[package]]
 name = "prolog_parser"
 version = "0.7.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ordered-float 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -112,7 +113,7 @@ dependencies = [
  "downcast 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "ordered-float 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "prolog_parser 0.7.16",
+ "prolog_parser 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
  "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -151,6 +152,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "cacfcab5eb48250ee7d0c7896b51a2c5eec99c1feea5f32025635f5ae4b00070"
 "checksum num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "630de1ef5cc79d0cdd78b7e33b81f083cbfe90de0f4b2b2f07f905867c70e9fe"
 "checksum ordered-float 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "58d25b6c0e47b20d05226d288ff434940296e7e2f8b877975da32f862152241f"
+"checksum prolog_parser 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71a1f33a90a68d4641143f591c9d97d6c939622d5bfbebed3630d7264f593736"
 "checksum redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "ab105df655884ede59d45b7070c8a65002d921461ee813a024558ca16030eea0"
 "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
 "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
index 33f5cb981efa963a977b4fcea8c20b9adf6e71f3..4d0dd215fb7a6d0f071dee9d5aa2a060e2d9211b 100644 (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].");
 }