mirror of
https://github.com/lune-org/lune.git
synced 2024-12-13 13:30:38 +00:00
16 lines
496 B
Lua
16 lines
496 B
Lua
|
local VALID_STYLES = { "bold", "dim" }
|
||
|
local INVALID_STYLES = { "", "*bold*", "dimm", "megabright", "cheerful", "sad", " " }
|
||
|
|
||
|
for _, style in VALID_STYLES do
|
||
|
if not pcall(console.setStyle, style :: any) then
|
||
|
error(string.format("Setting style failed for style '%s'", style))
|
||
|
end
|
||
|
end
|
||
|
|
||
|
for _, style in INVALID_STYLES do
|
||
|
if pcall(console.setStyle, style :: any) then
|
||
|
console.resetStyle()
|
||
|
error(string.format("Setting style should have failed for style '%s' but succeeded", style))
|
||
|
end
|
||
|
end
|