diff options
-rw-r--r-- | example/simple-example.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/example/simple-example.lua b/example/simple-example.lua index 6f35400..c80564c 100644 --- a/example/simple-example.lua +++ b/example/simple-example.lua @@ -10,6 +10,7 @@ -- supple = require'supple' +luxio = require'luxio' -- Code string to run in the untrusted environment subcode = [[ @@ -121,7 +122,7 @@ lprint_fail(supple.host.run(errsrc, "@error-code", loopback)) local long_run = [[ local s = "" - for i = 1, 10000 do + for i = 1, 100000 do s = s .. "FISHFISHFISHFISHFISH" end return #s @@ -209,7 +210,12 @@ local update_code = [[ ]] for i = 1, 1000 do - lprint_ok(supple.host.run(update_code, "@update-hook", "REPO", updates)) + supple.track.start() + local ok, res = pcall(supple.host.run, update_code, "@update-hook", "REPO", updates) + if not ok then print(res) print(supple.track.stop()) end + lprint_ok(ok) + lprint_ok(res) + supple.track.stop() if passed ~= tests then os.exit(1) end |