diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-09-23 11:13:23 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-09-23 11:13:23 +0200 |
commit | 828c5ccb585209f4f7a6f1de84a69d53f76b9081 (patch) | |
tree | 95cd1f9d643150e9f36aa6faab71132c20bcacf6 /test | |
parent | de35d2d26a58b9979dcd274f2c1969e0504bc2a9 (diff) |
Diffstat (limited to 'test')
-rw-r--r-- | test/test.test | 21 | ||||
-rw-r--r-- | test/test_import.test | 4 |
2 files changed, 23 insertions, 2 deletions
diff --git a/test/test.test b/test/test.test index 58be29b..9fea5b2 100644 --- a/test/test.test +++ b/test/test.test @@ -28,8 +28,8 @@ const map: [string][string or integer] = [ }, ] -main("pipe1") => print($) -main("pipe2") => main($) => print($) +main("pipe1!") => print($) +main("pipe2!") => main($) => print($) const test_type: type = { const test_field: string = "test" @@ -59,3 +59,20 @@ object.test_field = "hey" object.test_function() => print($) object.nested.another_field = 5 object.nested.another_function(add = 2) => print($) + +if (henshin == 2) { + print("nice") +} +print(henshin == 3 or henshin > 1) +henshin = 4 +if (henshin == 3) { + print("shouldn't be") +} else if (henshin == 2 or henshin != 3) { + print("else will") +} else if (henshin != 3 and henshin != 2) { + print("else won't") +} + +const scoped: [string][string or function] = import("test_import.test") +print(scoped) +scoped.exported_function() => print($) diff --git a/test/test_import.test b/test/test_import.test new file mode 100644 index 0000000..99b3a08 --- /dev/null +++ b/test/test_import.test @@ -0,0 +1,4 @@ +const exported: string = "I am exported" +const exported_function: function = (): string { + return "I am also exported!" +} |