forked from yizhu2000/suproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.lua
45 lines (44 loc) · 1.17 KB
/
test.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--function scandir(directory)
-- local i, t, popen = 0, {}, io.popen
-- local pfile = popen('dir "'..directory..'*.lua" /b')
-- for filename in pfile:lines() do
-- i = i + 1
-- t[i] = filename
-- end
-- pfile:close()
-- return t
--end
--local currentDir=debug.getinfo(1).source:sub(1,#debug.getinfo(1).source-8)
--print(currentDir)
--local files=scandir("C:\\env\\openresty-1.15.8.3-win64\\lualib\\gateway\\")
--for i,v in ipairs (files) do
-- print(v)
-- local mod=require("suproxy."..v:sub(1,#v-4))
-- if mod.test then
-- mod.test()
-- end
--end
print("start testing")
local m=require "suproxy.utils.compatibleLog"
m.test()
m=require "suproxy.utils.datetime"
m.test()
m=require "suproxy.utils.event"
m.test()
m=require "suproxy.utils.pureluapack"
m.test()
m=require "suproxy.utils.tableUtils"
m.test()
m=require "suproxy.utils.unicode"
m.test()
m=require "suproxy.tns.tnsPackets"
m.test()
m=require "suproxy.tds.tdsPackets"
m.test()
m=require "suproxy.ssh2.shellCommand"
m.test()
m=require "suproxy.ldap.ldapPackets"
m.test()
m=require "suproxy.balancer.balancer"
m.test()
print("All test finished without error")