17 lines
1.1 KiB
Lua
17 lines
1.1 KiB
Lua
|
|
local root=assert(arg[1])
|
||
|
|
local P={}
|
||
|
|
assert(loadfile(root..'LayoutPolicy.lua'))('RuenUI',P)
|
||
|
|
local font,size,flags='native-cyrillic-capable-font',12,'OUTLINE'
|
||
|
|
local changes=0
|
||
|
|
ChatFrame1={GetFont=function()return font,size,flags end}
|
||
|
|
function FCF_SetChatWindowFontSize(_,frame,value)assert(frame==ChatFrame1);size=value;changes=changes+1 end
|
||
|
|
RuenUICharacter={};P.ApplyChatDefaults()
|
||
|
|
assert(size==14 and changes==1 and RuenUICharacter.chatFontOriginal.size==12)
|
||
|
|
P.ApplyChatDefaults();assert(changes==1,'font defaults reapplied')
|
||
|
|
size=16;P.RestoreChatDefaults();assert(size==16,'restore overwrote later font choice')
|
||
|
|
size=14;P.RestoreChatDefaults();assert(size==12,'font restore failed')
|
||
|
|
RuenUICharacter={version=5};size=18;P.ApplyChatDefaults();assert(size==18,'upgrade changed existing font')
|
||
|
|
local count=0;for _ in pairs(P.controlFrameSet)do count=count+1 end
|
||
|
|
assert(count==10 and #P.controlFrameNames==10,'control declarations inconsistent/duplicated')
|
||
|
|
print('PASS: shared ten-frame reservations, readable fresh-install chat font, idempotency, custom font and upgrade preservation, conditional restore')
|