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:
17
samples/Terra/vars2.t
Normal file
17
samples/Terra/vars2.t
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
a = global(int) --testing variable with no initializer
|
||||
|
||||
|
||||
terra foo()
|
||||
a = 3
|
||||
end
|
||||
|
||||
terra bar()
|
||||
return a
|
||||
end
|
||||
|
||||
|
||||
local test = require("test")
|
||||
|
||||
foo()
|
||||
test.eq(bar(),3)
|
||||
Reference in New Issue
Block a user