File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ --- @brief [[
2+ --- Tests for infoview horizontal layout with fractional height.
3+ --- @brief ]]
4+
5+ local infoview = require ' lean.infoview'
6+
7+ -- Emulate a 80x24 landscape display.
8+ vim .o .columns = 80
9+ vim .o .lines = 24
10+
11+ require (' lean' ).setup {
12+ infoview = {
13+ autoopen = false ,
14+ orientation = ' horizontal' ,
15+ height = 0.5 ,
16+ },
17+ }
18+
19+ describe (' infoview window fractional horizontal' , function ()
20+ it (' opens with fractional height' , function ()
21+ infoview .open ()
22+ local height = infoview .get_current_infoview ().window :height ()
23+ assert .is .equal (24 / 2 , height )
24+ end )
25+ end )
Original file line number Diff line number Diff line change 1+ --- @brief [[
2+ --- Tests for infoview vertical layout with fractional width.
3+ --- @brief ]]
4+
5+ local infoview = require ' lean.infoview'
6+
7+ -- Emulate a 80x24 portrait display.
8+ vim .o .columns = 80
9+ vim .o .lines = 24
10+
11+ require (' lean' ).setup {
12+ infoview = {
13+ autoopen = false ,
14+ orientation = ' vertical' ,
15+ width = 1 / 2 ,
16+ },
17+ }
18+
19+ describe (' infoview window fractional vertical' , function ()
20+ it (' opens with fractional width' , function ()
21+ infoview .open ()
22+ local width = infoview .get_current_infoview ().window :width ()
23+ assert .is .equal (80 / 2 , width )
24+ end )
25+ end )
You can’t perform that action at this time.
0 commit comments