diff options
author | nea <nea@nea.moe> | 2023-08-10 02:26:42 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-10 02:26:42 +0200 |
commit | f345fadd492ea5bb09e515d007be438fc08c9b93 (patch) | |
tree | 2b2b99dc7e75387ba16cdb43d107bcedf84d4938 /test | |
parent | e4661bf1fecf5a214a020a56b9658dc49565e162 (diff) | |
download | nealisp-f345fadd492ea5bb09e515d007be438fc08c9b93.tar.gz nealisp-f345fadd492ea5bb09e515d007be438fc08c9b93.tar.bz2 nealisp-f345fadd492ea5bb09e515d007be438fc08c9b93.zip |
Add imports
Diffstat (limited to 'test')
-rw-r--r-- | test/res/secondary.lisp | 3 | ||||
-rw-r--r-- | test/res/test.lisp | 4 | ||||
-rw-r--r-- | test/src/TestLisp.kt | 1 |
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) } |