Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F131446
window_spec.lua
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
900 B
Referenced Files
None
Subscribers
None
window_spec.lua
View Options
local
window
=
require
"ivy.window"
local
controller
=
require
"ivy.controller"
describe
(
"window"
,
function
()
before_each
(
function
()
vim
.
cmd
"highlight IvyMatch cterm=bold gui=bold"
window
.
initialize
()
end
)
after_each
(
function
()
controller
.
destroy
()
end
)
it
(
"can initialize and destroy the window"
,
function
()
assert
.
is_equal
(
vim
.
api
.
nvim_get_current_buf
(),
window
.
buffer
)
window
.
destroy
()
assert
.
is_equal
(
nil
,
window
.
buffer
)
end
)
it
(
"can set items"
,
function
()
window
.
set_items
{
{
content
=
"Line one"
}
}
assert
.
is_equal
(
"Line one"
,
window
.
get_current_selection
())
end
)
it
(
"will set the items when a string is passed in"
,
function
()
local
items
=
table.concat
({
"One"
,
"Two"
,
"Three"
},
"
\n
"
)
window
.
set_items
(
items
)
assert
.
is_equal
(
items
,
table.concat
(
vim
.
api
.
nvim_buf_get_lines
(
window
.
buffer
,
0
,
-
1
,
true
),
"
\n
"
))
end
)
end
)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Apr 6 2026, 5:53 PM (5 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10583
Default Alt Text
window_spec.lua (900 B)
Attached To
Mode
R1 ivy.nvim
Attached
Detach File
Event Timeline
Log In to Comment