@@ -44,6 +44,23 @@ describe("plenary.popup", function()
4444 eq (true , vim .api .nvim_win_is_valid (border_id ))
4545 end )
4646
47+ it (" can apply a border highlight" , function ()
48+ local _ , opts = popup .create (" hello there" , {
49+ border = true ,
50+ borderhighlight = " PopupColor2" ,
51+ })
52+
53+ local border_win_id = opts .border .win_id
54+ eq (" Normal:PopupColor2" , vim .api .nvim_win_get_option (border_win_id , " winhl" ))
55+ end )
56+
57+ it (" can ignore border highlight with no border" , function ()
58+ local _ = popup .create (" hello there" , {
59+ border = false ,
60+ borderhighlight = " PopupColor3" ,
61+ })
62+ end )
63+
4764 it (" can do basic padding" , function ()
4865 local win_id = popup .create (" 12345" , {
4966 line = 1 ,
@@ -74,7 +91,7 @@ describe("plenary.popup", function()
7491 describe (" borderchars" , function ()
7592 local test_border = function (name , borderchars , expected )
7693 it (name , function ()
77- local win_id , config = popup .create (" all the plus signs" , {
94+ local _ , config = popup .create (" all the plus signs" , {
7895 line = 8 ,
7996 col = 55 ,
8097 padding = { 0 , 3 , 0 , 3 },
0 commit comments