summaryrefslogtreecommitdiffstats
path: root/plugins/luarocks/test.lua
blob: 1016231ca25cff443e7b5debbd238154c4c76195 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local lpeg = require 'lpeg'
assert(((lpeg.R('AZ'))^1):match("TEXT") == 5)

local http = require "socket.http"
assert(http.request("http://mxe.cc"):match('MXE'))

local ll = require 'llthreads2'
local thread = ll.new("return 123")
thread:start()
local ok, result = thread:join()
assert(ok)
assert(result == 123)

local rapidjson = require 'rapidjson'
assert(rapidjson.encode(123) == '123')
assert(rapidjson.decode('["xyz"]')[1] == "xyz")