]> Repositorios git - scryer-prolog.git/commitdiff
Add tests for PR #2756
authorEmilie Burgun <[email protected]>
Tue, 7 Jan 2025 17:10:50 +0000 (18:10 +0100)
committerEmilie Burgun <[email protected]>
Wed, 8 Jan 2025 16:57:40 +0000 (17:57 +0100)
tests-pl/load-context-unreachable.pl [new file with mode: 0644]
tests/scryer/issues.rs

diff --git a/tests-pl/load-context-unreachable.pl b/tests-pl/load-context-unreachable.pl
new file mode 100644 (file)
index 0000000..5a0f278
--- /dev/null
@@ -0,0 +1 @@
+:- initialization((M = user, loader:load_context(M))).
index de318708b57468b1c3f426bc375aa78d517d75b0..207c490942bc1e1c76a137665401a67edb3651ac 100644 (file)
@@ -25,3 +25,11 @@ fn issue2588_load_html() {
 fn call_qualification() {
     load_module_test("tests-pl/issue2361-call-qualified.pl", "");
 }
+
+// PR #2756: ensures that calling load_context with a bound variable doesn't trigger unreachable!()
+#[serial]
+#[test]
+#[cfg_attr(miri, ignore = "it takes too long to run")]
+fn load_context_unreachable() {
+    load_module_test("tests-pl/load-context-unreachable.pl", "");
+}