diff --git a/src/test/cases/BasicTestCase.hx b/src/test/cases/BasicTestCase.hx index 10205d8..a64f9c1 100644 --- a/src/test/cases/BasicTestCase.hx +++ b/src/test/cases/BasicTestCase.hx @@ -278,6 +278,10 @@ class BasicTestCase extends Test { Assert.equals("loaded", BasicTestCase.loadedFunction()); } + function testLoadInline() { + _testLoadInline(); + } + function testAssignArith() { _testAssignArith(); } diff --git a/src/test/cases/BasicTestCase.kiss b/src/test/cases/BasicTestCase.kiss index 8704326..a0532e6 100644 --- a/src/test/cases/BasicTestCase.kiss +++ b/src/test/cases/BasicTestCase.kiss @@ -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") diff --git a/src/test/cases/BasicTestCaseExtra2.kiss b/src/test/cases/BasicTestCaseExtra2.kiss new file mode 100644 index 0000000..0d28b5c --- /dev/null +++ b/src/test/cases/BasicTestCaseExtra2.kiss @@ -0,0 +1,2 @@ +// Using inline (load) for something like this would actually be terrible: +(set thatValue 50) \ No newline at end of file