Skip to content

Commit de3353b

Browse files
committed
Fix bugs regarding testing
1 parent c9dccc2 commit de3353b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/config.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ for _, currArg in pairs(arg) do
1515
if currArg == "--CI" then
1616
local releaseName = string.gsub(string.format("%s %s %s", NAME, REVISION, VERSION), "%s", "-")
1717
print(releaseName)
18-
return
1918
end
2019

2120
if currArg == "--FullVersion" then
2221
print(VERSION)
23-
return
2422
end
2523
end
2624

tests.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ for i, filename in ipairs(scandir(testdir)) do
107107
local code = file:read("*a");
108108
print(Prometheus.colors("[CURRENT] ", "magenta") .. filename);
109109
for name, preset in pairs(presets) do
110+
for i = #preset.Steps, 1, -1 do
111+
if preset.Steps[i].Name == "AntiTamper" then
112+
table.remove(preset.Steps, i);
113+
end
114+
end
110115
pipeline = Prometheus.Pipeline:fromConfig(preset);
111116
local obfuscated = pipeline:apply(code);
112117

@@ -115,9 +120,6 @@ for i, filename in ipairs(scandir(testdir)) do
115120

116121
if funcb == nil then
117122
print(Prometheus.colors("[FAILED] ", "red") .. "(" .. filename .. "): " .. name .. ", Invalid Lua!");
118-
if ciMode then
119-
error("Test Failed!")
120-
end
121123
print("[SOURCE]", obfuscated);
122124
fc = fc + 1;
123125
else
@@ -128,9 +130,6 @@ for i, filename in ipairs(scandir(testdir)) do
128130
print("[OUTA] ", outa);
129131
print("[OUTB] ", outb);
130132
print("[SOURCE]", obfuscated);
131-
if ciMode then
132-
error("Test Failed!")
133-
end
134133
fc = fc + 1;
135134
end
136135
end
@@ -143,5 +142,8 @@ if fc < 1 then
143142
return 0;
144143
else
145144
print(Prometheus.colors("[FAILED] ", "red") .. "Some tests failed!");
145+
if ciMode then
146+
error("Test Failed!")
147+
end
146148
return -1;
147149
end

0 commit comments

Comments
 (0)