aboutsummaryrefslogtreecommitdiff
path: root/tests/simple/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple/test.py')
-rw-r--r--tests/simple/test.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/simple/test.py b/tests/simple/test.py
new file mode 100644
index 0000000..20c1c7e
--- /dev/null
+++ b/tests/simple/test.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python3
+
+# This module is called @{name()}
+
+import @{module}
+
+print("@{function()
+ return "Hello World"
+end}")
+
+print("@{function()
+ local a = { "asdf", "1234" }
+ return a[1]
+end}")
+
+print(@{function()
+ local a = { "asdf", "1234" } -- {
+ return a[2]
+end})
+
+print("@{function()
+ local a = "asdf{asdf"
+ return a:sub(1)
+end}")
+
+print("@{function()
+ local a = "asdf"
+ --[[
+ some comment }
+ --]]
+ return a
+end}")
+
+print("@{function()
+ local a = [[
+ some comment }
+ ]]
+ return a:sub(2, 8)
+end}")