-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathRunTests.lua
41 lines (36 loc) · 863 Bytes
/
RunTests.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
local String = require("string");
local Lockbox = require("lockbox");
Lockbox.ALLOW_INSECURE = true;
local tests = {
"Base64Tests",
"MD2Tests",
"MD4Tests",
"MD5Tests",
"RIPEMD128Tests",
"RIPEMD160Tests",
"SHA1Tests",
"SHA2_224Tests",
"SHA2_256Tests",
"HMACTests",
"HKDFTests",
"PBKDF2Tests",
"DESCipherTests",
"DES3CipherTests",
"AES128CipherTests",
"AES192CipherTests",
"AES256CipherTests",
"TEACipherTests",
"XTEACipherTests",
};
local status = 0
for _, v in pairs(tests) do
print(String.format("Running %s...", v));
local ok, err = pcall(require, "test." .. v);
if not ok then
print(String.format("FAIL: %s failed with error:\n%s\n", v, err));
status = 1
else
print(String.format("%s passed!\n", v));
end
end
os.exit(status, true)