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/nestnoerror.t
Normal file
17
samples/Terra/nestnoerror.t
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
terra haserror()
|
||||
return (1):foo()
|
||||
end
|
||||
|
||||
local m = macro(function()
|
||||
local success = pcall(function() haserror:compile() end)
|
||||
assert(not success)
|
||||
return 1
|
||||
end)
|
||||
|
||||
terra noerror()
|
||||
return m()
|
||||
end
|
||||
|
||||
assert(1 == noerror())
|
||||
Reference in New Issue
Block a user