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 @@
1local lpeg = require 'lpeg'
2assert(((lpeg.R('AZ'))^1):match("TEXT") == 5)
3
4local http = require "socket.http"
5assert(http.request("http://mxe.cc"):match('MXE'))
6
7local ll = require 'llthreads2'
8local thread = ll.new("return 123")
9thread:start()
10local ok, result = thread:join()
11assert(ok)
12assert(result == 123)
13
14local rapidjson = require 'rapidjson'
15assert(rapidjson.encode(123) == '123')
16assert(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