summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/res/secondary.lisp3
-rw-r--r--test/res/test.lisp4
-rw-r--r--test/src/TestLisp.kt1
3 files changed, 8 insertions, 0 deletions
diff --git a/test/res/secondary.lisp b/test/res/secondary.lisp
new file mode 100644
index 0000000..4231721
--- /dev/null
+++ b/test/res/secondary.lisp
@@ -0,0 +1,3 @@
+
+(def sc 42)
+(export sc)
diff --git a/test/res/test.lisp b/test/res/test.lisp
index 5f32bee..c4406b0 100644
--- a/test/res/test.lisp
+++ b/test/res/test.lisp
@@ -17,3 +17,7 @@
(testsomething true)
(testsomething false)
(noop)
+(debuglog "============")
+(debuglog "This should fail" sc)
+(import :secondary)
+(debuglog "This should work" sc) \ No newline at end of file
diff --git a/test/src/TestLisp.kt b/test/src/TestLisp.kt
index 7a520fb..5563042 100644
--- a/test/src/TestLisp.kt
+++ b/test/src/TestLisp.kt
@@ -8,6 +8,7 @@ fun main() {
val otherP = LispParser.parse(File(T::class.java.getResource("/test.lisp")!!.file))
val executionContext = LispExecutionContext()
executionContext.setupStandardBindings()
+ executionContext.registerModule("secondary", LispParser.parse(File(T::class.java.getResource("/secondary.lisp")!!.file)))
val bindings = executionContext.genBindings()
executionContext.executeProgram(bindings, otherP)
}