mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 21:10:36 +00:00
14 lines
424 B
Lua
14 lines
424 B
Lua
local STYLES_VALID = { "reset", "bold", "dim" }
|
|
local STYLES_INVALID = { "", "*bold*", "dimm", "megabright", "cheerful", "sad", " " }
|
|
|
|
for _, style in STYLES_VALID do
|
|
stdio.style(style :: any)
|
|
stdio.style("reset")
|
|
end
|
|
|
|
for _, style in STYLES_INVALID do
|
|
if pcall(stdio.style, style :: any) then
|
|
stdio.style("reset")
|
|
error(string.format("Setting style should have failed for style '%s' but succeeded", style))
|
|
end
|
|
end
|