test inline (load)

This commit is contained in:
2021-07-25 20:06:34 -06:00
parent d0697c6a67
commit e8d38d2330
3 changed files with 11 additions and 0 deletions

View File

@@ -278,6 +278,10 @@ class BasicTestCase extends Test {
Assert.equals("loaded", BasicTestCase.loadedFunction());
}
function testLoadInline() {
_testLoadInline();
}
function testAssignArith() {
_testAssignArith();
}

View File

@@ -1,6 +1,11 @@
// (load) brings in the fields and compile-time definitions of another Kiss file
(load "BasicTestCaseExtra.kiss")
(function _testLoadInline []
(let [&mut thatValue 5]
(load "BasicTestCaseExtra2.kiss")
(Assert.equals 50 thatValue)))
// (var) declares static variables
(var message "Howdy")

View File

@@ -0,0 +1,2 @@
// Using inline (load) for something like this would actually be terrible:
(set thatValue 50)