mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
16
samples/Terra/def1.t
Executable file
16
samples/Terra/def1.t
Executable file
@@ -0,0 +1,16 @@
|
||||
import "lib/def"
|
||||
|
||||
local c = 3
|
||||
local a = 4
|
||||
local b = def(a) a + c
|
||||
local d = b(10)
|
||||
|
||||
def e(a) a + c
|
||||
local def f(a) a + c
|
||||
|
||||
print(d, e(10), f(10))
|
||||
|
||||
local test = require("test")
|
||||
test.eq(d,13)
|
||||
test.eq(e(10),13)
|
||||
test.eq(f(10),13)
|
||||
Reference in New Issue
Block a user