History

add plugin luarocks

LuaRocks plugin adds * package "luarocks" * several packages with rocks (lpeg, luasocket, llthreads2, lua-rapidjson) * plugins/luarocks/README.md * virtual rock "all-rocks" depending on all rocks * short test for rocks

Boris Nagaev committed 10 years ago

Commit 43cb3191 parent 08488f914 files · +622 −0Browse files

Showing the changes to plugins/luarocks/test.lua (1 of 14 files). Show all

Unified · Split

plugins/luarocks/test.lua+16−0
@@ -0,0 +1,16 @@
1+local lpeg = require 'lpeg'
2+assert(((lpeg.R('AZ'))^1):match("TEXT") == 5)
3+
4+local http = require "socket.http"
5+assert(http.request("http://mxe.cc"):match('MXE'))
6+
7+local ll = require 'llthreads2'
8+local thread = ll.new("return 123")
9+thread:start()
10+local ok, result = thread:join()
11+assert(ok)
12+assert(result == 123)
13+
14+local rapidjson = require 'rapidjson'
15+assert(rapidjson.encode(123) == '123')
16+assert(rapidjson.decode('["xyz"]')[1] == "xyz")

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t