1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-21 23:48:34 +00:00

better startup

This commit is contained in:
kepler155c@gmail.com
2017-09-25 22:49:44 -04:00
parent ea56ac325b
commit 80f3ba1fb0
5 changed files with 82 additions and 21 deletions

View File

@@ -10,13 +10,24 @@ local function runDir(directory, desc, open)
table.sort(files)
for _,file in ipairs(files) do
--print(desc .. file)
os.sleep(0)
local result, err = open(directory .. '/' .. file)
if not result then
printError(err)
if result then
term.setTextColor(colors.green)
term.write('[PASS] ')
term.setTextColor(colors.white)
term.write(fs.combine(directory, file))
else
term.setTextColor(colors.red)
term.write('[FAIL] ')
term.setTextColor(colors.white)
term.write(fs.combine(directory, file))
if err then
printError(err)
end
success = false
end
print()
end
return success