Skip to content

Commit cad6272

Browse files
author
livecodealex
committed
[Bug 20405] Added tests
1 parent 98e1c6d commit cad6272

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

tests/lcs/core/interface/button.livecodescript

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,28 @@ on TestBug18293
6565
delete stack "popup menu"
6666
TestAssert "deleting popped up menu stack shouldn't crash", true
6767
end TestBug18293
68+
69+
on TestBug20405
70+
71+
local text1, text2, text3
72+
put "Ln1" into text1
73+
put "Line 1" into text2
74+
put "Ln1\nLine 1" into text3
75+
76+
create stack "test"
77+
create button "b1"
78+
create button "b2"
79+
create button "b3"
80+
81+
set the label of button "b1" to text1
82+
set the label of button "b2" to text2
83+
set the label of button "b3" to text3
84+
85+
local fW1, fW2, fW3
86+
put the formattedWith of button "b1" into fW1
87+
put the formattedWidth of button "b2" into fW2
88+
put the formattedWidth of button "b3" into fW3
89+
90+
TestAssert "returns correct formattedWidth", fW3 is max(fW1, fW2)
91+
92+
end TestBug20405

0 commit comments

Comments
 (0)