summaryrefslogtreecommitdiff
path: root/lua/tests/pickers/find_files__with_ctrl_n.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/tests/pickers/find_files__with_ctrl_n.lua')
-rw-r--r--lua/tests/pickers/find_files__with_ctrl_n.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/lua/tests/pickers/find_files__with_ctrl_n.lua b/lua/tests/pickers/find_files__with_ctrl_n.lua
new file mode 100644
index 0000000..e6eecdd
--- /dev/null
+++ b/lua/tests/pickers/find_files__with_ctrl_n.lua
@@ -0,0 +1,24 @@
+pcall(function() RELOAD('telescope') end)
+
+local builtin = require('telescope.builtin')
+local tester = require('telescope.pickers._tests')
+
+local key = 'find_files'
+local input = 'fixtures/file<c-p>'
+local expected = 'lua/tests/fixtures/file_2.txt'
+local get_actual = function()
+ return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":.")
+end
+
+-- local on_complete_item = tester.picker_feed(input, expected, get_actual, true)
+--
+-- builtin[key] {
+-- on_complete = { on_complete_item }
+-- }
+
+tester.builtin_picker('find_files', 'fixtures/file<c-p>', 'lua/tests/fixtures/file_2.txt', function()
+ return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":.")
+end, {
+ debug = false,
+})
+