Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F131679
utils_line_action_spec.lua
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
754 B
Referenced Files
None
Subscribers
None
utils_line_action_spec.lua
View Options
local
utils
=
require
"ivy.utils"
local
line_action
=
utils
.
line_action
()
describe
(
"utils line_action"
,
function
()
before_each
(
function
()
spy
.
on
(
vim
,
"cmd"
)
end
)
it
(
"will run the line command"
,
function
()
line_action
" 4: Some text"
assert
.
is_equal
(
#
vim
.
cmd
.
calls
,
1
,
"The `vim.cmd` function should be called once"
)
assert
.
spy
(
vim
.
cmd
).
was_called_with
"4"
end
)
it
(
"will run with more numbers"
,
function
()
line_action
" 44: Some text"
assert
.
is_equal
(
#
vim
.
cmd
.
calls
,
1
,
"The `vim.cmd` function should be called once"
)
assert
.
spy
(
vim
.
cmd
).
was_called_with
"44"
end
)
it
(
"dose not run any action if no line is found"
,
function
()
line_action
"Some text"
assert
.
spy
(
vim
.
cmd
).
was_not_called
()
end
)
end
)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Apr 6 2026, 6:14 PM (5 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10582
Default Alt Text
utils_line_action_spec.lua (754 B)
Attached To
Mode
R1 ivy.nvim
Attached
Detach File
Event Timeline
Log In to Comment